A comprehensive mobile application to help aspiring data professionals assess their career suitability and practice technical skills through gamified learning.
Codebasics Assess helps users discover their ideal data career path (Data Analyst, Data Scientist, or Data Engineer) through a weighted scoring algorithm and provides skill-building through topic-based MCQ tests with gamification elements.
- Career Suitability Test: 12-question assessment with role-specific weighted scoring
- Skill Tests: Topic-based MCQs for Python, SQL, Excel, Statistics, and more
- Practice Mode: Unlimited practice with instant feedback and explanations
- Gamification: XP points, levels, badges, streaks, and leaderboards
- Admin Panel: Manage questions, users, and configure scoring weights
codebasics-learning-app/
├── backend/ # Node.js + Express API
├── mobile/ # React Native + Expo app
├── admin/ # React + Vite admin panel
├── docker-compose.yml
└── README.md
| Component | Technology |
|---|---|
| Backend | Node.js, Express, PostgreSQL |
| Mobile App | React Native, Expo, Zustand |
| Admin Panel | React, Vite, Ant Design |
| Database | PostgreSQL 15 |
| Containerization | Docker, Docker Compose |
- Docker (v20.10+)
- Docker Compose (v2.0+)
# Clone the repository
git clone <repository-url>
cd codebasics-learning-app
# Create environment file
cp .env.example .env
# (Optional) Edit .env to customize settings
nano .env# Start PostgreSQL and Backend (Development mode)
docker-compose up -d
# View logs
docker-compose logs -fThis will:
- Start PostgreSQL database on port
5432 - Run database migrations automatically
- Seed the database with sample questions and badges
- Start the backend API on port
3000
# Start admin panel with hot reload
docker-compose --profile dev up admin-dev -d
# Or start manually
cd admin
npm install
npm run devAdmin panel will be available at: http://localhost:3001
Default Admin Credentials:
Email: admin@codebasics.io
Password: Admin@123
To create additional admin users:
# Using Docker
docker exec -it codebasics-backend npm run create-admin admin@example.com YourPassword "Admin Name"
# Or locally
cd backend && npm run create-admin admin@example.com YourPassword "Admin Name"The mobile app runs outside Docker using Expo:
cd mobile
npm install
npx expo startThen:
- Press
ifor iOS Simulator - Press
afor Android Emulator - Scan QR code with Expo Go app on your device
Important: Update the API URL in mobile/src/services/api.js:
// For local development, use your machine's IP address
const API_BASE_URL = 'http://YOUR_LOCAL_IP:3000/api';
// To find your IP:
// macOS/Linux: ifconfig | grep "inet "
// Windows: ipconfig# Start all services
docker-compose up -d
# Stop all services
docker-compose down
# View logs
docker-compose logs -f backend
docker-compose logs -f postgres
# Rebuild after code changes
docker-compose up -d --build
# Reset database (WARNING: deletes all data)
docker-compose down -v
docker-compose up -d
# Access PostgreSQL CLI
docker exec -it codebasics-postgres psql -U codebasics -d codebasics_assess- Node.js 18+
- PostgreSQL 15+
- npm or yarn
# Connect to PostgreSQL
psql -U postgres
# Create database and user
CREATE USER codebasics WITH PASSWORD 'codebasics123';
CREATE DATABASE codebasics_assess OWNER codebasics;
GRANT ALL PRIVILEGES ON DATABASE codebasics_assess TO codebasics;
\qcd backend
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit .env with your database credentials
# DATABASE_URL=postgresql://codebasics:codebasics123@localhost:5432/codebasics_assess
# Run migrations
npm run db:migrate
# Seed database
npm run db:seed
# Start development server
npm run devBackend API will be available at: http://localhost:3000
cd admin
# Install dependencies
npm install
# Start development server
npm run devAdmin panel will be available at: http://localhost:3001
cd mobile
# Install dependencies
npm install
# Start Expo
npx expo starthttp://localhost:3000/api
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register |
Register new user |
| POST | /auth/login |
Login with email/password |
| POST | /auth/google |
Google OAuth login |
| POST | /auth/linkedin |
LinkedIn OAuth login |
| POST | /auth/apple |
Apple Sign-In |
| POST | /auth/forgot-password |
Request password reset |
| POST | /auth/reset-password |
Reset password with token |
| Method | Endpoint | Description |
|---|---|---|
| GET | /career/questions |
Get all career questions |
| POST | /career/submit |
Submit career test answers |
| GET | /career/history |
Get user's test history |
| GET | /career/result/:attemptId |
Get specific result |
| Method | Endpoint | Description |
|---|---|---|
| GET | /skill-tests |
List all skill tests |
| GET | /skill-tests/:id |
Get test details |
| POST | /skill-tests/:id/start |
Start a test attempt |
| POST | /skill-tests/:id/submit |
Submit test answers |
| GET | /skill-tests/history |
Get test history |
| GET | /practice/questions |
Get practice questions |
| POST | /practice/submit |
Submit practice answer |
| Method | Endpoint | Description |
|---|---|---|
| GET | /user/profile |
Get user profile |
| PUT | /user/profile |
Update profile |
| GET | /user/stats |
Get user statistics |
| GET | /user/badges |
Get user badges |
| GET | /user/streak |
Get streak info |
| Method | Endpoint | Description |
|---|---|---|
| GET | /leaderboard/weekly |
Weekly leaderboard |
| GET | /leaderboard/all-time |
All-time leaderboard |
| GET | /leaderboard/rank |
User's current rank |
users- User accounts and profilescareer_questions- Career test questionscareer_question_options- Answer options with scorescareer_role_weights- Role-specific weights (DA/DS/DE)career_test_attempts- Career test submissionsskill_tests- Skill test definitionsskill_questions- MCQ questions for skill testsskill_test_attempts- Skill test submissionsbadges- Badge definitionsuser_badges- Earned badgesleaderboard_weekly- Weekly XP rankingsuser_activity_log- Activity tracking
# Run all pending migrations
npm run db:migrate
# Reset database (drops and recreates)
npm run db:reset
# Seed with sample data
npm run db:seed| Variable | Description | Default |
|---|---|---|
NODE_ENV |
Environment mode | development |
PORT |
Backend server port | 3000 |
DATABASE_URL |
PostgreSQL connection string | - |
JWT_SECRET |
JWT signing secret | - |
JWT_EXPIRES_IN |
Token expiration | 7d |
GOOGLE_CLIENT_ID |
Google OAuth client ID | - |
LINKEDIN_CLIENT_ID |
LinkedIn OAuth client ID | - |
LINKEDIN_CLIENT_SECRET |
LinkedIn OAuth secret | - |
APPLE_CLIENT_ID |
Apple Sign-In client ID | - |
Default XP rewards (configurable in admin panel):
| Activity | XP |
|---|---|
| Career Test Completion | 100 |
| Skill Test (per correct answer) | 10 |
| Practice Mode (correct) | 5 |
| Daily Login | 10 |
| Streak Bonus (per day) | 20 |
| Level | Name | Min XP |
|---|---|---|
| 1 | Beginner | 0 |
| 2 | Explorer | 500 |
| 3 | Learner | 1,500 |
| 4 | Achiever | 3,500 |
| 5 | Expert | 7,000 |
| 6 | Master | 12,000 |
backend/
├── src/
│ ├── config/ # Database and app config
│ ├── controllers/ # Route handlers
│ ├── middlewares/ # Auth, validation, etc.
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ └── validators/ # Input validation
├── database/
│ ├── migrations/ # SQL migrations
│ └── seeds/ # Sample data
└── tests/ # Unit tests
mobile/
├── src/
│ ├── components/ # Reusable UI components
│ ├── constants/ # Theme, config
│ ├── navigation/ # React Navigation setup
│ ├── screens/ # Screen components
│ ├── services/ # API client
│ └── store/ # Zustand stores
admin/
├── src/
│ ├── pages/ # Admin pages
│ ├── services/ # API client
│ └── store/ # Auth store
# Backend tests
cd backend
npm test
# Run with coverage
npm run test:coverageThe project uses ESLint for code linting:
# Lint backend
cd backend && npm run lint
# Lint admin
cd admin && npm run lint# Build production images
docker-compose -f docker-compose.yml -f docker-compose.prod.yml build
# Start with production profile
docker-compose --profile production up -d- Set strong
JWT_SECRET - Configure production
DATABASE_URL - Set
NODE_ENV=production - Configure OAuth credentials
- Set up SSL/TLS
- Configure CORS for your domain
- Set up monitoring and logging
Database connection failed
# Check if PostgreSQL is running
docker-compose ps postgres
# View database logs
docker-compose logs postgresPort already in use
# Find process using port 3000
lsof -i :3000
# Kill the process
kill -9 <PID>Mobile app can't connect to backend
- Ensure you're using your machine's local IP (not localhost)
- Check that the backend is running and accessible
- Verify no firewall is blocking the connection
Docker build fails
# Clean Docker cache
docker system prune -a
# Rebuild without cache
docker-compose build --no-cache- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Create an issue for bug reports
- Email: support@codebasics.io
- Documentation: https://docs.codebasics.io
Built with ❤️ by the Codebasics Team