{"id":26818793,"url":"https://github.com/soumyadeep6845/code-review-assistant-backend","last_synced_at":"2026-04-11T19:35:31.621Z","repository":{"id":284934115,"uuid":"930352868","full_name":"soumyadeep6845/code-review-assistant-backend","owner":"soumyadeep6845","description":"The AI-Based Code Review Assistant allows users to submit code, which is then analyzed by an AI model (like OpenAI’s GPT) for suggestions, optimizations, and best practices. Users can retrieve past reviews and insights from the system.","archived":false,"fork":false,"pushed_at":"2025-04-12T19:32:41.000Z","size":3262,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T20:26:52.958Z","etag":null,"topics":["ai","contribute","contributions-welcome","docker","good-first-issue","gpt-4","gradle","java","jwt","mysql","openai","opensource","spring","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soumyadeep6845.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-10T13:55:43.000Z","updated_at":"2025-04-12T19:32:45.000Z","dependencies_parsed_at":"2025-04-04T15:29:16.414Z","dependency_job_id":null,"html_url":"https://github.com/soumyadeep6845/code-review-assistant-backend","commit_stats":null,"previous_names":["soumyadeep6845/code-review-assistant-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soumyadeep6845/code-review-assistant-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumyadeep6845%2Fcode-review-assistant-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumyadeep6845%2Fcode-review-assistant-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumyadeep6845%2Fcode-review-assistant-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumyadeep6845%2Fcode-review-assistant-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soumyadeep6845","download_url":"https://codeload.github.com/soumyadeep6845/code-review-assistant-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumyadeep6845%2Fcode-review-assistant-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31693272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","contribute","contributions-welcome","docker","good-first-issue","gpt-4","gradle","java","jwt","mysql","openai","opensource","spring","spring-boot"],"created_at":"2025-03-30T05:14:54.694Z","updated_at":"2026-04-11T19:35:31.613Z","avatar_url":"https://github.com/soumyadeep6845.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eAI Code Review Assistant\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"assets/maingif.gif\" alt=\"Logo\" width=\"400\" height=\"400\"/\u003e\n\u003c/p\u003e\n\u003c!-- PROJECT LOGO --\u003e\n\n## 🚀 Overview\nThis is the **backend** of the Code Review Assistant, a powerful AI-driven system designed to analyze code snippets and provide intelligent feedback. The backend handles API requests, communicates with OpenAI's GPT models, caches responses using Redis, and stores submission data securely.\n\n## 🛠 Tech Stack\n- **Language:** Java (v17)\n- **Framework:** Spring Boot\n- **Database:** MySQL\n- **API Communication:** REST (Spring MVC)\n- **API Documentation:** Swagger (v3)\n- **Build Tool:** Gradle\n- **Security:** Spring Security\n- **Authentication:** JWT (custom, with encryption)\n- **Logging:** SLF4j\n- **Cache Layer:** Redis\n- **Unit Test:** JUnit, Mockito\n- **Containerization:** Docker\n\n## 📸 Application Screenshots\n\n### 🔹 Authentication Page\n![Auth](./assets/auth.png)\n\n### 🔹 Home Page\n![Home](./assets/homescreen.png)\n\n### 🔹 About Page\n![About](./assets/about.png)\n\n### 🔹 Code Review in Action\n![Review](./assets/codereview.png)\n![Feedback](./assets/codefeedback.png)\n\n### 🔹 API Documentation (Swagger)\n![Swagger](./assets/swaggerscreen.png)\n\n### 🔹 Contact Page\n![Contact](./assets/contactscreen.png)\n\n### 🔹 MySQL Database (SQLYog)\n![Database](./assets/database.png)\n\n### 🔹 Local Cache (Redis)\n![Redis](./assets/redislocalcache.png)\n\n### 🔹 Containerization (Docker) - Backend\n![Docker](./assets/dockerbackend.png)\n\n---\n\n## 📦 Installation \u0026 Setup\n\n### Prerequisites\n- Java 17\n- MySQL\n- Redis\n- Gradle\n- Docker\n- Docker Compose\n\n### 1️⃣ Clone the Repository\n```sh\ngit clone https://github.com/your-username/code-review-assistant-backend.git\ncd code-review-assistant-backend\n```\n\n### 2️⃣ Set Up Environment Secrets\n\nCreate a `secrets.properties` file in the **root directory** of your backend project:\n\n```properties\nopenai.api.key=\u003cyour-openai-api-key\u003e\njwt.secret=\u003cyour-jwt-secret\u003e\n```\n\n#### 🔑 Generate OpenAI API Key\n\nGenerate your OpenAI API key from the [OpenAI website](https://platform.openai.com/).\nCopy the output and use it as the **openai.api.key** value in your `secrets.properties` file.\n\n#### 🔐 Generate JWT Secret\n\nTo generate a secure JWT secret, open **Windows PowerShell as Administrator** and run the following command:\n\n```powershell\n[Convert]::ToBase64String((1..32 | ForEach-Object {Get-Random -Maximum 256}))\n```\nCopy the output and use it as the **jwt.secret** value in your `secrets.properties` file.\n\n### 3️⃣ Start the Backend (using Docker Compose)\n\n```sh\ndocker-compose up --build\n```\n\u003e Note: Starting Redis server and MySQL database separately, is not required. It has already been integrated.\n\u003e If still required, run:\n\u003e ```\n\u003e docker run --name mysql-container -e MYSQL_ROOT_PASSWORD=yourpassword -e MYSQL_DATABASE=code_review -p 3306:3306 -d mysql:latest\n\u003e docker run --name redis-container -p 6379:6379 -d redis\n\u003e ```\nThe backend will now be running on **http://localhost:8080**.\n\n---\n\n## 📌 Features\n\n✅ AI-based code analysis using GPT-4o  \n✅ Caching of responses using Redis  \n✅ RESTful API for frontend communication  \n✅ Secure authentication \u0026 authorization with JWT  \n✅ MySQL database integration  \n✅ Containerized using Docker\n\n---\n\n## 📂 Folder Structure\n\n```\ncode-review-assistant-backend/\n│-- personal/\n│   │-- src/\n│   │   ├── main/\n│   │   │   ├── java/com/example/personal/\n│   │   │   │   ├── config/         # Configurations\n│   │   │   │   ├── controllers/    # API Controllers\n│   │   │   │   ├── models/         # Data Models\n│   │   │   │   ├── repositories/   # Database Repositories\n│   │   │   │   ├── security/       # Security Configuration\n│   │   │   │   ├── services/       # Business Logic Services\n│   │   │   │   ├── util/           # Helpers \u0026 Utilities\n│   │   │   ├── resources/\n│   │   │       ├── application.properties  # Application Configuration\n│   │   ├── test/           # Unit \u0026 Integration Tests\n│   │-- build.gradle        # Gradle Build Configuration\n│   │-- Dockerfile          # Docker Configuration\n│   │-- docker-compose.yml  # Docker Compose Configuration\n│   │-- secrets.properties  # Key Secrets (to be created separately)\n│-- README.md\n```\n\n---\n\n## 📜 API Endpoints\n\n### 🔐 Authentication Endpoints (`/auth`)\n| Method | Endpoint         | Description                                 |\n|--------|------------------|---------------------------------------------|\n| POST   | `/auth/register` | Registers a new user                        |\n| POST   | `/auth/login`    | Authenticates a user and returns JWT token  |\n| GET    | `/auth/verify`   | Verifies the provided JWT token             |\n\n### 🤖 Code Review Endpoints (`/api/code-review`)\n| Method | Endpoint                  | Description                          |\n|--------|---------------------------|--------------------------------------|\n| POST   | `/api/code-review/submit` | Submits code for AI-based review     |\n\n---\n\n## 📌 Deployment\n\n### Build Docker Image\n\n```sh\ndocker build -t code-review-backend .\ndocker run -p 8080:8080 code-review-backend\n```\n\u003e *ℹ️ For local development with Redis and MySQL, it’s recommended to use docker-compose for convenience.*\n\n---\n\n## 🎯 Contribution\n\nIf you'd like to contribute, feel free to **fork** the repository, create a **new branch**, and raise a **pull request** with changes you deem necessary!\n\n## 💚 Found this project interesting?\n\nIf you found this project useful, then please consider leaving a ⭐ on [GitHub](https://github.com/soumyadeep6845/code-review-assistant-backend). Thank you! 😄\n\n## 👨 Project Maintained By\n\n[Soumyadeep Das](https://www.linkedin.com/in/soumya0021/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumyadeep6845%2Fcode-review-assistant-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoumyadeep6845%2Fcode-review-assistant-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumyadeep6845%2Fcode-review-assistant-backend/lists"}