Apply your knowledge to build something amazing!
ℹ️ Project Overview Duration: 2 weeks Difficulty: Intermediate Focus: Backend development with Express.js (extending Template 11) Type: Individual project
This project builds upon Template 11: Quest Tracker API located at /Templates/activity-11-quest-api/
. You'll extend the existing gamified quest system with advanced features.
test.html
)You'll transform Template 11's in-memory system into a production-ready API with persistent storage, user management, and social features.
By completing this project, you will:
Extend Template 11's Quest Tracker API with production-ready features that transform it from a demo into a scalable application.
User Authentication System
Database Integration
Enhanced Quest Management
Advanced Player Features
Social Features
Quest Discovery
Enhanced Security
Performance Optimization
Real-time Features
Advanced Analytics
Integration Features
http://localhost:3000/api
Authorization: Bearer <jwt_token>
Method | Endpoint | Description | New Features |
---|---|---|---|
GET | /quests |
Get user's quests | User-specific filtering, advanced search |
GET | /quests/:id |
Get specific quest | Ownership validation, sharing status |
POST | /quests |
Create new quest | User ownership, template support |
PUT | /quests/:id |
Update quest | Owner-only updates, history tracking |
DELETE | /quests/:id |
Delete quest | Soft delete, achievement impact |
POST | /quests/:id/share |
Share quest with others | NEW: Social sharing |
POST | /quests/:id/clone |
Clone shared quest | NEW: Template creation |
GET | /quests/shared |
Browse public quests | NEW: Quest discovery |
GET | /quests/templates |
Get quest templates | NEW: Reusable patterns |
Method | Endpoint | Description | New Features |
---|---|---|---|
POST | /auth/register |
Register new player | NEW: User creation |
POST | /auth/login |
Login player | NEW: JWT generation |
POST | /auth/logout |
Logout player | NEW: Token invalidation |
GET | /players/me |
Get own profile | NEW: Authenticated user data |
PUT | /players/me |
Update own profile | NEW: Profile customization |
GET | /players/:id |
Get public player profile | Privacy controls |
GET | /players/leaderboard |
Global leaderboard | Enhanced rankings |
GET | /players/me/achievements |
Get player achievements | NEW: Personal achievements |
GET | /players/me/activity |
Get activity feed | NEW: Quest history |
Method | Endpoint | Description |
---|---|---|
GET | /discover/trending |
Get trending quests |
GET | /discover/recommended |
Get personalized recommendations |
GET | /social/feed |
Get social activity feed |
POST | /social/quests/:id/like |
Like a shared quest |
GET | /social/followers |
Get followers list |
POST | /social/follow/:playerId |
Follow another player |
{
"success": true,
"data": {
"id": "quest_123",
"title": "Master Express.js",
"description": "Build three production APIs",
"category": "learning",
"difficulty": "medium",
"xp_reward": 250,
"status": "in_progress",
"owner": {
"id": "player_456",
"username": "alex_coder",
"level": 15
},
"sharing": {
"is_public": true,
"likes": 42,
"clones": 8
},
"progress": {
"percentage": 60,
"days_remaining": 5,
"urgency": "medium"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z"
},
"message": "Quest retrieved successfully",
"meta": {
"player_can_edit": true,
"player_can_share": true,
"achievement_progress": ["api_builder", "quest_master"]
}
}
Goal: Extend Template 11 with user authentication and database integration
POST /auth/register
)POST /auth/login
)Goal: Add social features, quest sharing, and deploy to production
POST /quests/:id/share
)POST /quests/:id/clone
)GET /discover/*
)quest-tracker-api-extended/
├── package.json
├── .gitignore
├── .env.example
├── README.md
├── server.js # Enhanced from Template 11
├── database/
│ ├── connection.js # NEW: Database connection
│ ├── models/ # NEW: Database models
│ │ ├── User.js
│ │ ├── Quest.js
│ │ └── Achievement.js
│ └── migrations/ # NEW: Database migrations
├── middleware/
│ ├── auth.js # NEW: JWT authentication
│ ├── validation.js # Enhanced validation
│ └── errorHandler.js # From Template 11
├── routes/
│ ├── quests.js # Extended from Template 11
│ ├── players.js # Extended from Template 11
│ ├── categories.js # From Template 11
│ ├── auth.js # NEW: Authentication routes
│ ├── social.js # NEW: Social features
│ └── discover.js # NEW: Quest discovery
├── controllers/
│ ├── questController.js # NEW: Quest business logic
│ ├── userController.js # NEW: User management
│ ├── socialController.js # NEW: Social features
│ └── authController.js # NEW: Authentication logic
├── utils/
│ ├── jwt.js # NEW: JWT utilities
│ ├── validation.js # NEW: Input validation
│ └── emailService.js # NEW: Email notifications
├── tests/
│ ├── auth.test.js # NEW: Authentication tests
│ ├── quests.test.js # Enhanced from Template 11
│ └── social.test.js # NEW: Social feature tests
└── docs/
├── API.md # NEW: Complete API documentation
└── DEPLOYMENT.md # NEW: Deployment guide
Create comprehensive test collections for:
PORT=3000
JWT_SECRET=your-super-secret-jwt-key
DATABASE_URL=your-database-connection-string
NODE_ENV=production
CORS_ORIGIN=https://your-frontend-domain.com
EMAIL_SERVICE_API_KEY=your-email-service-key (optional)
Criteria | Excellent (A) | Good (B) | Satisfactory (C) | Needs Work (F) |
---|---|---|---|---|
Extension Quality (35%) | Seamlessly extends Template 11, adds significant value | Good integration, solid features | Basic extension works | Poor integration, breaks existing features |
Authentication & Security (25%) | Complete JWT system, proper security, data validation | Good auth implementation, minor gaps | Basic auth works, some security issues | Security vulnerabilities present |
Database Integration (20%) | Efficient queries, proper schema, data integrity | Good database design, minor issues | Basic database works | Poor data modeling, performance issues |
Social Features (20%) | Rich social features, quest sharing, discovery | Some social features implemented | Basic sharing works | Missing or broken social features |
Your deployed API should demonstrate:
Submit your project through the course submission form including:
Submit Your Quest Tracker API Here
💡 Pro Tip: Think of this as evolving Template 11 into a production system. Your users are already familiar with the quest system - enhance their experience with authentication, persistence, and social features while keeping what they love about the original!