A complete rebuild leveraging Clarity 4 features for enhanced security, performance, and user experience
CircleCare transforms expense sharing from tracking debts into flowing care. Instead of "you owe Alice $50," we recognize that communities operate in circles of mutual careβeveryone contributes when they can, everyone receives when they need, and support comes full circle.
This is a ground-up rebuild of CircleCare, architected from the start to leverage Clarity 4's powerful new features including:
contract-hash?for contract integrity verificationrestrict-assets?for enhanced asset protectionto-ascii?for improved data serializationstacks-block-timefor time-based logicsecp256r1-verifyfor passkey authentication readiness
The original CircleCare prototype demonstrated the concept. This rebuild takes it to production-ready standards:
- Enhanced Security: Leveraging
restrict-assets?to prevent unauthorized asset movements - Contract Verification: Using
contract-hash?to ensure contract integrity - Time-Based Features: Implementing
stacks-block-timefor expiring expenses and automated settlements - Better Data Handling: Using
to-ascii?for improved serialization and cross-chain readiness - Future-Ready Auth: Foundation laid for
secp256r1-verifypasskey authentication
- Complete UI Redesign: Fresh color palette while maintaining CircleCare's warm, flowing philosophy
- Enhanced UX: Improved wallet connection, transaction feedback, and error handling
- Performance Optimizations: Better state management and data fetching strategies
- Accessibility: WCAG 2.1 AA compliance from the ground up
- Mobile-First: Responsive design optimized for all device sizes
circlecare/
βββ contracts/ # Clarity 4 smart contracts
β βββ contracts/
β β βββ circle-factory.clar # Circle creation and management
β β βββ circle-treasury.clar # Expense and settlement logic
β βββ tests/ # Comprehensive contract tests
β βββ Clarinet.toml # Clarity 4 configuration
β
βββ frontend/ # Next.js 15 application
β βββ app/ # App router pages
β βββ components/ # Reusable UI components
β βββ lib/ # Contract interactions & utilities
β βββ types/ # TypeScript definitions
β
βββ docs/ # Documentation
βββ ARCHITECTURE.md # Technical architecture
βββ CLARITY_4_FEATURES.md # How we use Clarity 4
βββ DEPLOYMENT.md # Deployment guide
- Clarity 4: Latest version with enhanced features
- Clarinet 2.x: Development and testing framework
- Vitest: Unit testing with clarinet-sdk
- Next.js 15: React framework with App Router
- React 19: Latest React features
- TypeScript 5.x: Type safety throughout
- Tailwind CSS 4: Modern utility-first CSS
- Stacks.js: Web3 integration
- TanStack Query: Data fetching and caching
- Node.js 18+ and npm/yarn
- Clarinet 2.x (Installation Guide)
- A Stacks wallet (Leather, Xverse, or compatible)
- STX on testnet (Get from faucet)
-
Clone the repository
git clone https://github.com/ThinkLikeAFounder/circlecare.git cd circlecare -
Install contract dependencies
cd contracts npm install -
Install frontend dependencies
cd ../frontend npm install
Smart Contracts
cd contracts
clarinet test # Run contract tests
clarinet console # Interactive REPL
clarinet check # Syntax checkingFrontend
cd frontend
npm run dev # Start development server
npm run build # Production build
npm run type-check # TypeScript validationWe use contract-hash? to verify that interacting contracts match expected implementations, preventing malicious contract substitution.
Settlement operations are wrapped with restrict-assets? to ensure:
- Users can only transfer amounts they actually owe
- Contract funds remain protected during external calls
- Automatic rollback on unauthorized transfers
Expenses can now have:
- Expiration timestamps for automatic resolution
- Time-locked settlements
- Scheduled recurring contributions
Convert principals, amounts, and other data to ASCII for:
- Better logging and events
- Cross-chain message formatting
- Human-readable receipts
- Create Care Circles: Organize your community
- Track Contributions: Transparent expense sharing
- Settle Debts: Simple STX transfers
- Time-Based Expenses: Set expiration dates
- Verified Contracts: Know you're interacting with authentic code
- Clarity 4 Native: Built for the latest Clarity features
- Comprehensive Tests: Full test coverage
- Type-Safe: TypeScript throughout the stack
- Well-Documented: Clear code and documentation
- Extensible: Easy to build on top of
cd contracts
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportcd frontend
npm run test # Unit tests
npm run test:e2e # End-to-end testsSee DEPLOYMENT.md for detailed instructions.
cd contracts
clarinet deployments generate --testnet
clarinet deployments apply --testnetDeploy to Vercel, Netlify, or any static hosting:
cd frontend
npm run buildComprehensive documentation is available in the /docs directory:
- Documentation Hub - Start here for all documentation
- User Guide - Complete usage instructions
- FAQ - Frequently asked questions
- Troubleshooting - Common issues and solutions
- Architecture - System architecture and design
- API Reference - Complete contract API documentation
- Clarity 4 Features - How we leverage Clarity 4
- Contributing - Development guidelines and standards
- Deployment - Deployment and infrastructure guide
- TypeScript Types - Complete type definitions
- Contract Tests - Comprehensive test suite
- Contract Documentation - Inline code documentation
We welcome contributions! Please see our Contributing Guide for detailed guidelines:
- Check existing issues or create a new one
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
For quick contributions:
- π Bug Reports: Use GitHub Issues
- π‘ Feature Requests: Create detailed GitHub Issues
- π Documentation: Improve our docs
- π§ Code: Follow our development guidelines
- Core Clarity 4 contracts with all new features
- Modern frontend with improved UX
- Comprehensive test coverage
- Documentation
- Recurring contributions
- Multi-token support (sBTC, other SIP-010 tokens)
- Passkey authentication using
secp256r1-verify - Mobile app (React Native)
- Cross-chain bridges
- DAO governance
- Analytics dashboard
- API for third-party integrations
MIT License - see LICENSE file for details
- Built on Stacks - Bitcoin Layer 2
- Powered by Clarity 4
- Developed for Talent Protocol Builder Challenge
- Complete Documentation - All guides and references
- User Guide - Get started with CircleCare
- FAQ - Quick answers to common questions
- Troubleshooting - Solve issues quickly
- Discord - Real-time community support
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Community discussions
- Twitter @CircleCare_xyz - Updates and announcements
- API Documentation - Contract interfaces and examples
- Architecture Guide - System design and components
- Contributing Guide - How to contribute code
- Deployment Guide - Setup and deployment instructions
CircleCare - Where care comes full circle, powered by Clarity 4 on Stacks