Transform your life through accountability and commitment
Features • Tech Stack • Installation • API Docs • Contributing
Sankalp (संकल्प - meaning "Resolution" in Hindi) is a habit-tracking platform that uses financial accountability to help users build lasting habits. Users commit to following 5 daily habits for 100 consecutive days with a ₹500 stake. Complete the challenge and keep your money. Fail, and the platform keeps it as a consequence of breaking your commitment.
"Put your money where your habits are."
- 🔐 Secure Authentication - Google OAuth integration for seamless sign-in
- 💰 Financial Commitment - ₹500 stake to ensure accountability
- 📊 Daily Habit Tracking - Track 5 customizable habits every day
- 📈 Progress Dashboard - Visual representation of your 100-day journey
- 🔥 Streak Counter - Monitor your consecutive days of success
- 📱 Responsive Design - Works seamlessly on desktop and mobile
- ⏰ Daily reminders and notifications
- 📅 Calendar view of habit completion
- 🏆 Achievement badges and milestones
- 📊 Analytics and insights
- 👥 Community leaderboard
Sankalp/
├── frontend/ # React TypeScript Frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── services/ # API service functions
│ │ ├── context/ # React context providers
│ │ ├── types/ # TypeScript type definitions
│ │ └── utils/ # Utility functions
│ ├── public/
│ └── package.json
│
├── backend/ # FastAPI Backend
│ ├── app/
│ │ ├── api/ # API route handlers
│ │ ├── core/ # Core configurations
│ │ ├── models/ # Pydantic models
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utility functions
│ ├── requirements.txt
│ └── main.py
│
├── docs/ # Documentation
└── README.md
- Node.js 18+ and npm/yarn
- Python 3.11+
- Supabase account
- Google Cloud Console project (for OAuth)
git clone https://github.com/SunilBaghel002/Sankalp.git
cd Sankalp# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Create environment file
cp .env.example .env.local
# Add your environment variables
# VITE_SUPABASE_URL=your_supabase_url
# VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# VITE_API_BASE_URL=http://localhost:8000
# Start development server
npm run dev# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
# Add your environment variables
# SUPABASE_URL=your_supabase_url
# SUPABASE_KEY=your_supabase_service_key
# GOOGLE_CLIENT_ID=your_google_client_id
# GOOGLE_CLIENT_SECRET=your_google_client_secret
# SECRET_KEY=your_jwt_secret_key
# Start the server
uvicorn main:app --reload-- Create users table
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
email VARCHAR(255) UNIQUE NOT NULL,
name VARCHAR(255),
avatar_url TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Create commitments table
CREATE TABLE commitments (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
amount DECIMAL(10, 2) DEFAULT 500.00,
start_date DATE NOT NULL,
end_date DATE NOT NULL,
status VARCHAR(50) DEFAULT 'active',
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Create habits table
CREATE TABLE habits (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
commitment_id UUID REFERENCES commitments(id) ON DELETE CASCADE,
name VARCHAR(255) NOT NULL,
description TEXT,
order_index INTEGER DEFAULT 0,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Create habit_logs table
CREATE TABLE habit_logs (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
habit_id UUID REFERENCES habits(id) ON DELETE CASCADE,
date DATE NOT NULL,
completed BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
UNIQUE(habit_id, date)
);Development: http://localhost:8000/api/v1 Production: https://api.sankalp-app.com/api/v1
| Method | Endpoint | Description |
|---|---|---|
POST |
/auth/google |
Google OAuth login |
POST |
/auth/logout |
Logout user |
GET |
/auth/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
POST |
/commitments |
Create new commitment |
GET |
/commitments |
Get user's commitments |
GET |
/commitments/:id |
Get commitment by ID |
PUT |
/commitments/:id |
Update commitment status |
| Method | Endpoint | Description |
|---|---|---|
POST |
/habits |
Create new habit |
GET |
/habits |
Get all habits for commitment |
PUT |
/habits/:id |
Update habit |
DELETE |
/habits/:id |
Delete habit |
| Method | Endpoint | Description |
|---|---|---|
POST |
/habits/:id/log |
Log habit completion |
GET |
/habits/:id/logs |
Get habit logs |
GET |
/commitments/:id/progress |
Get overall progress |
# Create a new commitment
curl -X POST https://api.sankalp-app.com/api/v1/commitments \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"habits": [
{"name": "Exercise", "description": "30 minutes workout"},
{"name": "Reading", "description": "Read 20 pages"},
{"name": "Meditation", "description": "10 minutes meditation"},
{"name": "Coding", "description": "1 hour of coding"},
{"name": "No Social Media", "description": "Avoid social media"}
],
"amount": 500
}'graph LR A[Sign Up] --> B[Pay ₹500] B --> C[Choose 5 Habits] C --> D[Track Daily for 100 Days] D --> E{Completed All Days?} E -->|Yes| F[🎉 Keep Your Money + Badge] E -->|No| G[💸 Forfeit to Platform]
- Commitment: Deposit ₹500 to start your 100-day journey
- 5 Habits: Choose exactly 5 habits to track daily
- Daily Check-in: Mark all 5 habits as complete each day
- No Breaks: Missing even one day means forfeiting your deposit
- Success: Complete all 100 days to keep your money and earn rewards
Contributions are welcome! Please follow these steps:
-
Fork the repository
git fork https://github.com/SunilBaghel002/Sankalp.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Commit your changes
git commit -m "Add: amazing feature" -
Push to branch
git push origin feature/amazing-feature
-
Open a Pull Request
Add:New featureFix:Bug fixUpdate:Update existing featureRemove:Remove feature/fileDocs:Documentation changes
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_API_BASE_URL=http://localhost:8000
VITE_GOOGLE_CLIENT_ID=your_google_client_idSUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_service_role_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
SECRET_KEY=your_jwt_secret_key
FRONTEND_URL=http://localhost:5173- User authentication with Google OAuth
- Basic habit tracking
- Progress dashboard
- Payment gateway integration (Razorpay)
- Email notifications
- Mobile app (React Native)
- Social features (friends, groups)
- AI-powered habit recommendations
- Partial refund system for near-completions
This project is licensed under the MIT License - see the LICENSE file for details.
- React - Frontend library
- FastAPI - Backend framework
- Supabase - Database and authentication
- Tailwind CSS - Styling
- All contributors and supporters of this project
⭐ Star this repo if you found it helpful!
Made with ❤️ and संकल्प (determination)





