This is a full-stack forum application built using modern web technologies. The app allows users to create posts, comment on posts, upvote posts, and manage user authentication.
- User authentication (signup, login, and logout)
- Create, edit, and delete posts
- Create, edit, and delete comments on posts
- Upvote posts
- View user activity history
- Pagination added 5 posts per page
- Interactive user interface
- Node.js: JavaScript runtime for building the server-side application.
- Express.js: Web framework for building RESTful APIs.
- Drizzle ORM: Type-safe ORM for database interactions.
- PostgreSQL: Relational database for storing application data.
- TypeScript: Strongly typed programming language for better code quality.
- dotenv: For managing environment variables.
- bcrypt: For hashing passwords securely.
- Nodemon: For automatic server restarts during development.
- Concurrently: For running multiple commands simultaneously during development.
- React: JavaScript library for building user interfaces.
- Redux Toolkit: For state management.
- React Router: For client-side routing.
- Axios: For making HTTP requests.
- Vite: Build tool for fast development and production builds.
- TypeScript: For type safety in the frontend code.
- PostgreSQL: Used as the database for storing users, posts, comments, and upvotes.
src/: Contains the server-side code.controllers/: Handles the business logic for routes.routes/: Defines API endpoints.db/: Contains database schema and connection logic.
drizzle/: Contains database migration files.drizzle.config.ts: Configuration for Drizzle ORM.
src/: Contains the client-side code.components/: Reusable UI components.features/: Redux slices for state management.utils/: Utility functions.App.tsx: Main application component.index.tsx: Entry point for the React app.
- Node.js and npm installed
- PostgreSQL database set up
-
Navigate to the
backenddirectory:cd backend -
Install dependencies:
npm install
-
Set up the
.envfile with your database credentials in the root asDATABASE_URL -
Run database migrations:
npm run migrate
-
Start the development server:
npm run dev
Frontend Setup
-
Navigate to the
frontenddirectory:cd frontend -
Install dependencies
npm install
-
Start the development server:
npm run dev
Accessing the App
- The backend server runs on
http://localhost:3000. - The frontend app runs on
http://localhost:5173.






