This is a full-stack web application that allows users to post comments and engage in discussions in real-time. It features a NestJS backend, a Next.js frontend, and a PostgreSQL database.
- User Authentication: Users can sign up and log in to their accounts.
- Real-time Comments: Post and view comments in real-time without needing to refresh the page.
- Nested Comments: Reply to comments and create nested discussion threads.
- Notifications (soon): Receive notifications when someone replies to your comment.
- NestJS - A progressive Node.js framework for building efficient, reliable and scalable server-side applications.
- Prisma - A next-generation ORM for Node.js and TypeScript.
- PostgreSQL - A powerful, open source object-relational database system.
- Redis - An in-memory data structure store, used as a database, cache and message broker.
- Socket.IO - A library that enables real-time, bidirectional and event-based communication between the browser and the server.
- BullMQ - A fast and robust queue system for Node.js.
- Next.js - A React framework for building full-stack web applications.
- TypeScript - A typed superset of JavaScript that compiles to plain JavaScript.
- Tailwind CSS - A utility-first CSS framework for rapidly building custom user interfaces.
- Socket.IO Client - The client-side library for Socket.IO.
- Three.js - A 3D graphics library for creating and displaying animated 3D computer graphics in a web browser.
-
Clone the repository:
git clone https://github.com/Shreehari-Acharya/Infinity-comments.git cd Infinity-comments
-
Backend Setup:
- Navigate to the
backend
directory:cd backend
- Install dependencies:
pnpm install
- Start the database and Redis using Docker:
docker-compose up -d
- Apply database migrations:
pnpm prisma migrate dev
- Start the backend server:
pnpm start:dev
- Navigate to the
-
Frontend Setup:
- Navigate to the
frontend
directory:cd ../frontend
- Install dependencies:
pnpm install
- Start the frontend development server:
pnpm dev
- Navigate to the
- Open your browser and navigate to
http://localhost:3000
. - Sign up for a new account or log in with an existing one.
- Start posting comments and engaging in discussions.
The project is organized into two main directories: backend
and frontend
.
backend/
: Contains the NestJS application, including the API, database schema, and real-time services.frontend/
: Contains the Next.js application, including the UI components, pages, and client-side logic.