Backend Projects
Goal of this file: Provide 5–8 production-level backend projects with architecture sketches, feature lists, tech stack suggestions, and stretch goals.
Project 1: Multitenant SaaS Backend (Subscription-based App)
-
Idea
- Build the backend for a multitenant SaaS product (e.g., project management app or expense tracker).
-
Core Features
- Tenant onboarding: create organization, invite users.
- Authentication & authorization:
- Email/password login.
- Roles:
OWNER,ADMIN,MEMBER.
- Resource scoping:
- Users, projects, tasks all belong to a tenant.
- Billing stub:
- Track active seats, plan type, and renewal date.
-
High-Level Architecture (ASCII)
Clients (Web/Mobile)
|
v
API Gateway / BFF
|
v
SaaS Backend Service ----> MongoDB/MySQL (multi-tenant schema)
|
+----> Redis (auth sessions, cache)
|
+----> Queue (email invites, async tasks)
-
Tech Stack
- Node.js + TypeScript.
- Express or Fastify.
- PostgreSQL/MySQL (preferred) or MongoDB.
- Redis for session cache and rate limiting.
-
Design Considerations
- Tenant isolation:
- Single DB, tenant_id column vs separate DB per tenant (start with first).
- RBAC:
- Middleware to check user role within tenant.
- Tenant isolation:
-
Stretch Goals
- Plan upgrades/downgrades.
- Feature flags per plan.
- Rate limiting per tenant.
Project 2: Real-Time Chat Service
-
Idea
- Build a real-time chat backend with rooms, direct messages, and typing indicators.
-
Core Features
- User registration and login.
- Create/join chat rooms.
- Send messages (room & 1:1).
- Typing indicators (best-effort).
- Message history pagination.
-
High-Level Architecture
WebSocket Clients <----> Chat Gateway (WS)
|
v
Chat Service
/ \
v v
Redis MongoDB
(pub/sub) (messages, rooms)
-
Tech Stack
- Node.js + TypeScript.
- WebSocket library (e.g., socket.io or ws).
- MongoDB for messages.
- Redis for pub/sub across instances.
-
Stretch Goals
- Presence (online/offline).
- Read receipts.
- Message search (basic text search).
Project 3: Notification Service (Email + Push + In-App)
-
Idea
- Build a dedicated notification microservice that can send notifications across channels.
-
Core Features
- API:
POST /notifications– create and send notifications.
- Channels:
- In-app (store in DB).
- Email (stub or integrate with a provider).
- Push (stub).
- Templates and localization:
- Template variables:
{userName},{link}, etc.
- Template variables:
- API:
-
High-Level Architecture
Producer Services (auth, order, etc.)
|
v
HTTP / Queue
|
v
Notification Service
/ | \
v v v
Email Push In-App Store
-
Tech Stack
- Node.js + TypeScript.
- Express/Fastify.
- MongoDB or PostgreSQL for notification logs & templates.
- Redis / BullMQ for background sending.
-
Stretch Goals
- User preferences (channel opt-in/out).
- Retry with backoff for failed notifications.
- Webhook for delivery receipts.
Project 4: Payment Simulation Service
-
Idea
- Implement a backend that simulates payment flows with a fake payment provider.
-
Core Features
- Create payment intents for orders.
- Confirm or cancel payments.
- Webhook endpoint to receive simulated provider events.
- Handle states:
PENDING,SUCCESS,FAILED,REFUNDED.
-
High-Level Architecture
Client / Order Service
|
v
Payment API (Node/TS)
|
+----> DB (payments, transactions)
|
+----> Fake Provider (local service / simulator)
|
v
Webhook to Payment API
-
Tech Stack
- Node.js + TypeScript.
- PostgreSQL/MySQL for transactional data.
-
Stretch Goals
- Idempotent payment creation (idempotency keys).
- Partial refunds.
- Simple reconciliation report.
Project 5: URL Shortener with Analytics
-
Idea
- Build a URL shortener with click analytics.
-
Core Features
- Shorten a long URL → short code.
- Redirect from short code → long URL.
- Track:
- Total clicks.
- Per-day click counts.
- Optional: referer, user agent.
-
High-Level Architecture
Client
|
v
Shortener API -----> DB (short_urls, stats)
|
+-----> Redis (cache: shortCode -> longUrl)
-
Tech Stack
- Node.js + TypeScript.
- Fastify/Express.
- PostgreSQL/MySQL or MongoDB.
- Redis for caching.
-
Stretch Goals
- Custom aliases.
- Expiry for links.
- Basic dashboard for analytics.
Project 6: Log Processing & Search Pipeline
-
Idea
- Build a mini log ingestion + query system.
-
Core Features
- Ingest logs via HTTP (
POST /logs). - Buffer logs in a queue.
- Process logs and store:
- Raw logs.
- Derived fields (level, timestamp, service).
- Query logs by:
- Service.
- Time range.
- Level.
- Ingest logs via HTTP (
-
High-Level Architecture
App Services
|
v
HTTP Ingestor -> Queue -> Log Processor -> Storage (DB)
|
v
Query API
-
Tech Stack
- Node.js + TypeScript.
- MongoDB / Elasticsearch-like store (or simulate via Mongo).
- Redis/BullMQ for queue & processing.
-
Stretch Goals
- Support basic full-text search on messages.
- Implement retention policy (delete old logs).
Project 7: Rate Limiter as a Service
-
Idea
- Build a multi-tenant rate limiter service that other services can call.
-
Core Features
- API:
POST /checkwith{ apiKey, route, userId }→allowed: boolean.
- Configurable global and per-route limits per tenant.
- Redis-backed token bucket or sliding window implementation.
- API:
-
High-Level Architecture
Client Services
|
v
Rate Limiter Service
|
v
Redis (buckets/counters)
-
Tech Stack
- Node.js + TypeScript.
- Redis.
-
Stretch Goals
- Admin UI for rate limit configuration.
- Monitoring: dashboard for rate-limited requests.
How to Use These Projects
- Start with one core project (e.g., SaaS backend or notification service).
- Aim for:
- Proper architecture & layering.
- Tests, not just endpoints.
- Docs: README with API endpoints, examples, and trade-offs.
- Then add 1–2 supporting projects to demonstrate:
- Real-time communication.
- Background processing and queues.
- Observability and rate limiting.