Spherre is a next-generation platform for secure, collaborative, multi-user crypto wallet and treasury management. Built specifically for DAOs, startups, and organizations, it provides a modern way to manage crypto wallets with teams through a sophisticated multisig system.
- π Multisig Wallet Management - Secure collaborative wallet operations
- π₯ Member Management - Add, remove, and manage team members with role-based permissions
- π° Treasury Management - Comprehensive treasury oversight and control
- π Transaction Monitoring - Real-time transaction tracking and history
- π― Smart Will - Automated inheritance and succession planning
- π Staking Integration - DeFi staking capabilities (coming soon)
- π± Modern UI/UX - Intuitive interface built with Next.js and Tailwind CSS
- Framework: Next.js 15.1.6 with TypeScript
- Styling: Tailwind CSS with custom components
- State Management: React Context API
- Blockchain Integration: StarkNet with @starknet-react/core
- UI Components: Radix UI, Material-UI, Lucide React icons
- Charts: Chart.js with react-chartjs-2
- Forms: React Hook Form with Zod validation
- Framework: Flask 3.1.0 with Python 3.12
- Database: SQLAlchemy with PostgreSQL/SQLite
- Authentication: JWT with Flask-JWT-Extended
- API: RESTful with Flask-RESTful
- Blockchain: StarkNet integration with starknet-py
- Code Quality: Ruff for linting and formatting
- Containerization: Docker support
- Database Migrations: Flask-Migrate
- CORS: Cross-origin resource sharing enabled
- Environment: Configurable for development, testing, and production
spherre-dapp/
βββ frontend/ # Next.js frontend application
β βββ app/ # App router pages and components
β β βββ dapp/ # Main DApp interface
β β β βββ members/ # Member management
β β β βββ transactions/ # Transaction history
β β β βββ treasury/ # Treasury management
β β β βββ settings/ # User settings
β β β βββ ...
β β βββ onboarding/ # User onboarding flow
β β βββ components/ # Shared UI components
β βββ components/ # Global components
β βββ context/ # React context providers
β βββ lib/ # Utility functions
β βββ public/ # Static assets
βββ backend/ # Flask backend API
β βββ spherre/ # Main application package
β β βββ app/ # Flask application
β β β βββ models/ # Database models
β β β βββ views/ # API endpoints
β β β βββ service/ # Business logic
β β β βββ utils/ # Utility functions
β β βββ tests/ # Test suite
β βββ requirements.txt # Python dependencies
βββ docker-compose.yml # Container orchestration
- Node.js 18+ and npm 8+
- Python 3.12+
- Git
- Docker (optional, for containerized deployment)
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local
Configure the following variables:
NEXT_PUBLIC_STARKNET_CHAIN_ID=SN_GOERLI NEXT_PUBLIC_RPC_URL=your_starknet_rpc_url NEXT_PUBLIC_API_URL=http://localhost:5000
-
Start development server:
npm run dev
The frontend will be available at
http://localhost:3000
-
Navigate to backend directory:
cd backend -
Create virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
export FLASK_CONFIG=development export SECRET_KEY=your_secret_key export JWT_SECRET_KEY=your_jwt_secret export DATABASE_URL=sqlite:///db.sqlite3
-
Initialize database:
make db_init make makemigration command="Initial migration" make migrate -
Start the server:
make run
The API will be available at
http://localhost:5000
- Build and run with Docker Compose:
docker-compose up --build
-
frontend/app/dapp/- Main DApp interfacepage.tsx- Dashboard overviewmembers/- Member management systemtransactions/- Transaction history and detailstreasury/- Treasury management interfacesettings/- User preferences and security
-
frontend/app/onboarding/- User onboarding flow- Multi-step setup process
- Wallet connection and verification
- Initial configuration
-
frontend/components/- Reusable UI componentsui/- Base UI components (buttons, inputs, etc.)modals/- Modal components for various actionsshared/- Shared components across pages
-
Providers (
frontend/app/components/Providers.tsx)- StarkNet wallet connection
- Theme and context providers
-
Sidebar (
frontend/app/dapp/Sidebar.tsx)- Main navigation component
- Collapsible sidebar with hover effects
-
Navigation (
frontend/app/dapp/navigation.ts)- Route definitions and page mapping
- Active route detection
-
Component Development:
# Create new component touch frontend/app/components/NewComponent.tsx # Use TypeScript for type safety # Follow existing patterns in similar components
-
Page Development:
# Create new page mkdir frontend/app/dapp/new-feature touch frontend/app/dapp/new-feature/page.tsx # Add to navigation.ts if needed
-
Styling:
- Use Tailwind CSS classes
- Follow existing design patterns
- Use CSS variables for theming
backend/spherre/app/models/- Database modelsbackend/spherre/app/views/- API endpointsbackend/spherre/app/service/- Business logicbackend/spherre/app/utils/- Utility functions
-
Create new model:
# backend/spherre/app/models/new_model.py from spherre.app.extensions import db class NewModel(db.Model): id = db.Column(db.Integer, primary_key=True) # Add fields as needed
-
Create new service:
# backend/spherre/app/service/new_service.py class NewService: @staticmethod def create_new_item(data): # Business logic here pass
-
Create new view:
# backend/spherre/app/views/new_view.py from flask import Blueprint, request from spherre.app.service.new_service import NewService new_bp = Blueprint('new', __name__) @new_bp.route('/new-endpoint', methods=['POST']) def new_endpoint(): # API logic here pass
# Create new migration
make makemigration command="Add new feature"
# Apply migrations
make migrate
# Reset database (development only)
rm backend/spherre/db.sqlite3
make db_init
make makemigration command="Initial setup"
make migratecd frontend
npm run lint # ESLint
npm run prettier # Format codecd backend
make lint # Ruff linting
make format # Code formatting
pytest # Run testsNEXT_PUBLIC_STARKNET_CHAIN_ID=SN_GOERLI
NEXT_PUBLIC_RPC_URL=https://alpha4.starknet.io
NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_APP_NAME=SpherreFLASK_CONFIG=development
SECRET_KEY=your_secret_key_here
JWT_SECRET_KEY=your_jwt_secret_here
DATABASE_URL=sqlite:///db.sqlite3
STARKNET_PRIVATE_KEY=your_starknet_private_key- Development: SQLite (default)
- Production: PostgreSQL
- Testing: In-memory SQLite
-
Dashboard (
/dapp/)- Overview of wallet balance and recent activity
- Quick actions for common operations
- Charts and analytics
-
Members (
/dapp/members)- Add/remove team members
- Manage roles and permissions
- View member activity
-
Transactions (
/dapp/transactions)- Complete transaction history
- Transaction details and status
- Filtering and search capabilities
-
Treasury (
/dapp/treasury)- Asset management
- Portfolio overview
- Investment tracking
-
Settings (
/dapp/settings)- Profile management
- Security settings
- Preferences and notifications
- Trade - DEX integration for token swapping
- Stake - DeFi staking capabilities
- Smart Will - Automated inheritance planning
- Payments - Recurring payment management
- Apps - Third-party integrations
- Support - Help and documentation
- JWT-based authentication
- Role-based access control
- Secure wallet connection handling
- Input validation and sanitization
- CORS configuration
- Environment variable protection
cd frontend
npm run build
npm startcd backend
export FLASK_CONFIG=production
export DATABASE_URL=postgresql://user:pass@host/db
make rundocker-compose -f docker-compose.prod.yml up -d- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Frontend: ESLint + Prettier
- Backend: Ruff (PEP 8 compliance)
- TypeScript: Strict mode enabled
- Python: Type hints encouraged
- Documentation: Check the code comments and inline documentation
- Issues: Create an issue on GitHub for bugs or feature requests
- Discussions: Use GitHub Discussions for questions and ideas
- Website: spherre.xyz
- Documentation: docs.spherre.xyz
- StarkNet: starknet.io
Built with β€οΈ for the StarkNet ecosystem by Spherre Labs