DI
Divyanshkumar62/Skill_Forge
SkillForge is a gamified productivity and goal-setting app that turns self-growth into a game. With habit tracking, daily quests, and AI-powered guidance, it helps users build discipline, track progress, and level up in real life.
๐ Skill Forge - Productivity Platform
A full-stack productivity application that transforms boring task management into an engaging gamified experience. Built with modern technologies and production-ready architecture.
๐ฎ Features
โ Gamification System
- XP Rewards: Complete tasks to earn experience points
- Level Progression: Automatic level ups at XP milestones
- Badge System: Achievement unlocks and recognition
- Streak Tracking: Daily consistency rewards
- Rewards Shop: Spend XP on digital rewards
โ Task Management
- Goal Setting: Create and track personal goals
- Habit Formation: Daily/weekly habit tracking
- Progress Visualization: Analytics and statistics
- Smart Reminders: Automated notification system
- Milestone Tracking: Goal subdivision support
โ Advanced Analytics
- Progress Charts: Weekly activity visualization
- Consistency Scoring: Habit adherence tracking
- Skill Tree: Multi-dimensional progress tracking
- Streak Analytics: Historical streak comparisons
- Personal Insights: Data-driven improvement tips
โ Production Ready
- TypeScript: Full type safety and development experience
- Unit Tests: Comprehensive test coverage (Jest/Vitest)
- API Documentation: OpenAPI/Swagger specifications
- Security: JWT authentication, bcrypt password hashing
- Performance: Optimized queries and caching strategies
๐ ๏ธ Tech Stack
Backend
- Framework: Node.js + Express
- Language: TypeScript
- Database: MongoDB + Mongoose
- Authentication: JWT + bcrypt
- Testing: Jest + Supertest + mongodb-memory-server
- Scheduling: node-cron for automated tasks
Frontend
- Framework: React 19 + TypeScript
- Styling: Tailwind CSS + cyber theme
- State Management: Zustand
- Routing: React Router v7
- Charts: Recharts
- Testing: Vitest + React Testing Library
Dev Tools
- Linting: ESLint
- API Spec: OpenAPI 3.0
- CI/CD Ready: Jest testing framework
- Code Formatting: Consistent TypeScript standards
๐ Quick Start
Prerequisites
- Node.js 18+ installed
- MongoDB Atlas account OR local MongoDB
- npm or yarn package manager
1. Clone and Setup
# Clone the repository
git clone https://github.com/Divyanshkumar62/Skill_Forge/
cd skill-forge
# Setup backend
cd backend
npm install
# Setup frontend
cd ../frontend
npm install2. Environment Configuration
Backend Environment (.env)
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/skillforge
# OR for MongoDB Atlas:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/skillforge?retryWrites=true&w=majority
# JWT Configuration
JWT_SECRET=your-super-secure-jwt-secret-key-here-minimum-32-characters
JWT_EXPIRES_IN=7d
# Server Configuration
PORT=3001
NODE_ENV=development
# Email Configuration (Optional)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
EMAIL_FROM=noreply@skillforge.comFrontend Environment (.env)
VITE_API_URL=http://localhost:3000
VITE_ENV=development3. Database Setup
Option A: MongoDB Atlas (Recommended)
- Create a free MongoDB Atlas cluster
- Get connection string and add to MONGODB_URI
- Database will be automatically created on first run
Option B: Local MongoDB
# Install MongoDB locally
brew install mongodb-community # macOS
sudo apt-get install mongodb # Ubuntu
# Start MongoDB service
mongod4. Run the Application
Development Mode (Recommended)
# Terminal 1: Backend
cd backend
npm run dev # Runs on http://localhost:3000
# Terminal 2: Frontend
cd frontend
npm run dev # Runs on http://localhost:5173Production Mode
# Backend - Build and start
cd backend
npm run build
npm start
# Frontend - Build
cd frontend
npm run build
npm run preview๐ API Documentation
OpenAPI Specification
- Full API documentation:
docs/openapi.yaml - Interactive Swagger UI: http://localhost:3001/api-docs (when backend running)
Core Endpoints
// Authentication
POST /api/auth/register
POST /api/auth/login
// Tasks & Goals
GET /api/tasks
POST /api/tasks
DELETE /api/tasks/:id
// Gamification
POST /api/xp/earn
GET /api/rewards
POST /api/rewards/:id/purchase
// Analytics (NEW!)
GET /api/analytics/overview
GET /api/analytics/skillTree
// Notifications
GET /api/notifications
PATCH /api/notifications/:id/readAuthentication
All secure endpoints require JWT token:
Authorization: Bearer <your-jwt-token>๐๏ธ Sample Data & Seeding
Automated Seeding
The application includes sample data for testing:
# Backend seeding (automatically runs on first startup)
npm run seed # Creates sample users, habits, tasksManual Setup for Demo
// Create sample user (via API)
POST /api/auth/register
{
"name": "Demo Hero",
"email": "demo@skillforge.com",
"password": "password123"
}
// Sample goals created automatically:
// - Read for 30 minutes daily
// - Exercise 3x per week
// - Complete project milestone
// - Write daily journal๐ Project Structure
skill-forge/
โโโ backend/
โ โโโ src/
โ โ โโโ __tests__/ # Unit tests
โ โ โ โโโ auth.service.test.ts
โ โ โ โโโ xp.service.test.ts
โ โ โโโ controllers/ # API handlers
โ โ โ โโโ auth.controller.ts
โ โ โ โโโ analytics.controller.ts
โ โ โ โโโ xp.controller.ts
โ โ โโโ models/ # MongoDB schemas
โ โ โ โโโ user.model.ts
โ โ โ โโโ habit.model.ts
โ โ โ โโโ goal.model.ts
โ โ โโโ routes/ # API routes
โ โ โโโ services/ # Business logic
โ โ โโโ middlewares/ # Authentication, validation
โ โ โโโ utils/ # Helpers and utilities
โ โโโ jest.config.js # Jest configuration
โ โโโ package.json # Dependencies & scripts
โ โโโ docs/api-spec.yaml # API documentation
โโโ frontend/
โโโ src/
โ โโโ __tests__/ # Component tests
โ โ โโโ XpBar.test.tsx
โ โ โโโ HabitCard.test.tsx
โ โ โโโ LoginForm.test.tsx
โ โโโ components/ # Reusable UI components
โ โ โโโ gamification/XpBar.tsx
โ โ โโโ notifications/NotificationBell.tsx
โ โ โโโ layouts/DashboardLayout.tsx
โ โโโ features/ # Feature-sliced architecture
โ โ โโโ auth/ # Authentication feature
โ โ โโโ habits/ # Habits management
โ โ โโโ tasks/ # Task management
โ โ โโโ analytics/ # Analytics dashboard
โ โโโ pages/ # Route-level components
โ โโโ stores/ # Zustand state management
โ โโโ hooks/ # Custom React hooks
โ โโโ types/ # TypeScript type definitions
โโโ vite.config.ts # Vite configuration
โโโ tailwind.config.js # Tailwind CSS configuration
โโโ package.json # Frontend dependencies
๐ง Development Guidelines
Coding Standards
- TypeScript: 100% type coverage required
- Error Handling: Comprehensive try-catch blocks
- Authentication: JWT tokens for all user-specific endpoints
- Security: Input validation and sanitization
- Performance: Optimized database queries and caching
Testing Guidelines
- Unit Tests: All services and utilities
- Integration Tests: API endpoints and database operations
- Component Tests: React components with React Testing Library
- Coverage: Minimum 80% coverage target
Git Workflow
# Development workflow
git checkout -b feature/awesome-feature
# Make changes with tests
git commit -m "Add awesome feature with tests"
git push origin feature/awesome-feature
# Pull Request Requirements
- โ
All tests passing
- โ
Code review completed
- โ
TypeScript compilation successful
- โ
Documentation updatedEnvironment Variables for Production
NODE_ENV=production
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/skillforge_prod
JWT_SECRET=your-production-jwt-secret-minimum-32-characters
EMAIL_HOST=your-smtp-host
PORT=3001๐ค Contributing
Development Setup
- Fork the repository
- Clone your fork
- Create a feature branch
- Make changes with tests
- Ensure all tests pass
- Open a Pull Request
Code Quality
- Write comprehensive unit tests
- Update API documentation
- Follow TypeScript best practices
- Ensure responsive design works on all devices
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- GitHub Issues for bug reports
- Documentation in
docs/folder - Community discussions in Discussions tab
Built with โค๏ธ using modern web technologies. Transform productivity into fun!
On this page
Languages
TypeScript98.5%JavaScript1.0%CSS0.4%HTML0.1%
Contributors
Created April 23, 2025
Updated February 11, 2026