Skip to content

PrathameshDhande22/CodeReviewHub

Repository files navigation

CodeReview Hub

The definitive collaborative platform where Stack Overflow meets GitHub PRs.
Post your code, receive expert line-by-line reviews, and build your reputation as a Digital Architect.


Tech Stack

Next.js React TypeScript Prisma PostgreSQL MinIO TailwindCSS JavaScript


What is CodeReview Hub?

CodeReview Hub is a full-stack web application that lets developers post their code snippets and receive structured, expert peer reviews β€” think of it as GitHub Pull Requests combined with Stack Overflow, but focused entirely on collaborative code quality improvement.

Key Features

Feature Description
πŸ“ Post Code Share code snippets directly or upload a file. Tag with languages and topics.
πŸ’¬ Inline Comments GitHub-style line-by-line commenting with drag-to-select line ranges.
⭐ Peer Reviews Full review system with markdown support β€” post, edit, delete, and accept reviews.
πŸ† Reputation System Earn points when your reviews are accepted. Rise through architect levels.
πŸ” Browse & Filter Infinite scroll post feed filterable by language, status (Open / Accepted / Closed), and sort order.
🎨 Syntax Highlighting Beautiful code highlighting powered by Shiki with the Houston theme.
πŸ–ŠοΈ Monaco Editor VS Code's editor embedded for writing and editing code posts.
πŸ” Authentication Email/password auth with Google OAuth, password reset via email, and JWT sessions via NextAuth.
πŸ–ΌοΈ Profile User dashboard with reputation score, level rank, review history, and comment history.
πŸ—ƒοΈ File Storage Large code files and profile images stored in MinIO (S3-compatible object storage).
πŸ“„ Legal Pages Markdown-driven Terms & Privacy pages with SEO metadata.
πŸ—ΊοΈ SEO Auto-generated sitemap, robots.txt, Open Graph images, and Twitter cards per post.

Prerequisites

Make sure you have the following installed before getting started:


Getting Started

1. Clone the Repository

git clone https://github.com/PrathameshDhande22/CodeReviewHub.git
cd CodeReviewHub/my-app

2. Install Dependencies

yarn install

3. Configure Environment Variables

Copy the example environment file and fill in your values:

cp .env.example .env

Open .env and update the following:

# PostgreSQL β€” matches the docker-compose defaults
DATABASE_URL="postgresql://postgres:admin1234@localhost:5432/codereview?schema=public"

# NextAuth secret β€” generate with: openssl rand -base64 32
BETTER_AUTH_SECRET=your_random_secret_here

# Google OAuth (from Google Cloud Console)
AUTH_GOOGLE_ID=your_google_client_id
AUTH_GOOGLE_SECRET=your_google_client_secret

# MinIO (S3-compatible object storage)
MINIO_ACCESS_KEY=your_minio_access_key
MINIO_SECRET_KEY=your_minio_secret_key
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
MINIO_USE_SSL=false

4. Start Backend Services (Docker Compose)

The project uses Docker Compose to run PostgreSQL, pgAdmin, and MinIO locally.

See the Running with Docker Compose section below for details.

5. Set Up the Database

Generate the Prisma client and run migrations:

# Generate Prisma client types
yarn db:generate

# Apply database migrations
yarn db:migrate

6. Run the Development Server

yarn dev

The app will be available at http://localhost:3000.


🐳 Running with Docker Compose

The start-dockercompose.yaml file spins up all the required backend infrastructure services.

Services Included

Service Container Name Port Description
PostgreSQL 18 postgressql 5432 Primary application database
pgAdmin 4 pgadmin 8081 Web-based PostgreSQL GUI
MinIO minio-blobstorage 9000 / 9001 S3-compatible object storage for code files & images

Start with Docker

docker compose -f start-dockercompose.yaml up -d

Start with Podman

# Option 1 β€” Using the built-in npm script
yarn podman

# Option 2 β€” Manual
podman machine start
podman compose -f start-dockercompose.yaml up -d

Stop the Services

docker compose -f start-dockercompose.yaml down

# To also remove volumes (⚠️ deletes all data):
docker compose -f start-dockercompose.yaml down -v

Accessing the Services

Service URL Credentials
pgAdmin http://localhost:8081 Email: test@prathamesh.com / Password: test
MinIO Console http://localhost:9001 Configure via MinIO license & access keys
PostgreSQL localhost:5432 User: postgres / Password: admin1234

MinIO Note: MinIO uses a license file located at ./minio/minio.license. You need a valid MinIO AIStor license for the configured image. For development without a license, you can swap the image to minio/minio:latest and update the command to minio server /mnt/data --console-address ":9001".


Production Build

Build the Application

yarn build

Start the Production Server

yarn start

Screenshots

  1. Home Page Home Page

  2. Login Page Login page

  3. Register Page Register Page

  4. Browse Post Page Browse Post Page

  5. View Post Page view Post Page

  6. Review on Post Page Review on Post page

  7. Profile Page Profile Page

  8. Update Profile Update Profile

  9. New Post Page New Post Page


License

This project is licensed under the terms in the LICENSE file.


Built with ❀️ by Prathamesh Dhande

About

CodeReview Hub is a full-stack web application that lets developers post their code snippets and receive structured, expert peer review

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Contributors