A modern, distributed real-time study platform built with Next.js, Express, TypeScript, Redis, and PostgreSQL.
ProjectIt V2 is a complete rewrite of a legacy Node.js application, designed to demonstrate Senior Engineering competencies in 2025. It transitions from a monolithic architecture to a scalable Client-Server model with distributed systems features.
- Real-time Collaboration: WebSocket-based chat rooms powered by Socket.io and Redis Adapter for horizontal scaling.
- Distributed Job Queue: Custom Redis-based message broker for handling background tasks (e.g., email notifications).
- Safety First: Integrated profanity filtering to ensure a safe learning environment.
- Modern UI: Built with Next.js 14, Tailwind CSS, and Glassmorphism design principles.
- Robust Backend: Express.js with TypeScript, Prisma ORM, and Zod validation.
The application follows a Microservices-ready architecture:
graph TD
Client[Next.js Client] <-->|HTTP/REST| LB[Load Balancer / Nginx]
Client <-->|WebSocket| Socket[Socket.io Server]
subgraph Backend Layer
LB --> API[Express API Server]
Socket --> API
end
subgraph Data Layer
API -->|Read/Write| DB[(PostgreSQL)]
API -->|Pub/Sub & Cache| Redis[(Redis)]
end
subgraph Worker Layer
API -->|Push Job| Queue[Redis Queue]
Worker[Background Worker] -->|Pop Job| Queue
end
- Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS, Shadcn/UI concepts.
- Backend: Node.js, Express.js, TypeScript.
- Database: PostgreSQL (via Prisma ORM).
- Caching & Messaging: Redis (Pub/Sub, Job Queue, Rate Limiting).
- DevOps: Docker Compose, GitHub Actions (CI).
This project is deployed using a distributed multi-cloud strategy to maximize performance while remaining cost-effective:
| Component | Service | Role |
|---|---|---|
| Frontend | Vercel | Next.js Edge Network & Hosting |
| Backend | Render | Node.js API Server |
| Database | Supabase | Managed PostgreSQL |
| Redis | Upstash | Serverless Redis for Pub/Sub & Queues |
See deployment.md for a detailed step-by-step guide on how to replicate this infrastructure.
- Node.js (v18+)
- Docker Desktop
-
Clone the repository
git clone https://github.com/yourusername/projectit.git cd projectit -
Start Infrastructure
docker-compose up -d
-
Setup Backend
cd server npm install npx prisma migrate dev --name init npm run dev -
Setup Frontend
cd client npm install npm run dev -
Visit App: Open http://localhost:3000
- Rate Limiting: Custom Redis-based sliding window limiter on auth endpoints.
- Content Moderation:
bad-wordsfilter on all real-time messages. - Type Safety: End-to-end TypeScript coverage.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.