Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abinba/codereview
Simple site for people to review code and get your code reviewed.
https://github.com/abinba/codereview
Last synced: about 2 months ago
JSON representation
Simple site for people to review code and get your code reviewed.
- Host: GitHub
- URL: https://github.com/abinba/codereview
- Owner: abinba
- Created: 2021-02-06T16:18:03.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-17T12:55:38.000Z (7 months ago)
- Last Synced: 2024-06-20T21:09:45.459Z (6 months ago)
- Language: Go
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# CodeReview
## Introduction
In the fast-paced world of software development, constructive feedback and peer review are invaluable. **CodeReview** simplifies the code review process, allowing both anonymous and registered users to share, review, and improve code efficiently and effectively.
Key Features:
- **Ease of Use**: Share your code snippets or entire projects effortlessly. Paste your code onto our platform, and with just a few clicks, it's ready for review. No authentication required for posting, making it swift and straightforward for anyone to get feedback.
- **Privacy-Controlled Sharing**: Choose how you share your code. Make it public for the community to see and review, or share a private link with selected peers for targeted feedback. This flexibility ensures that you get the input you need while maintaining control over your work's visibility.
- **Line-by-Line Reviews**: Our platform enables detailed feedback down to specific lines of code. Reviewers can comment directly on lines that need attention, making it easier for the original poster to understand and apply suggestions.
- **Community-Driven Learning**: Whether you're sharing your code for review or contributing by reviewing others' code, CodeReview fosters a learning environment. Gain insights from different perspectives, improve coding practices, and contribute to a culture of knowledge sharing.
- **AI-Generated Code Review** (only for authorized users): Once you submit your code for review, our AI Bot will review your code and submit its feedback. Gain insights in seconds effortlessly.
## Tech-Stack
- GoLang 1.21
- Framework: GoFiber
- ORM: Gorm
- Database: Postgres 16## Setup
First of all, please ensure that you have the `.env` file in the following format (please specify credentials of the database you created):
```bash
DB_HOST=localhost # postgres, if you are running it in Docker
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=codereview
JWT_SECRET_KEY=secret
```And ensure that you have `db.env` file with the following contents (input your own password):
```bash
POSTGRES_PASSWORD=postgres
```### Swagger
To generate documentation based on declarative comments, [extension](https://github.com/gofiber/swagger) of GoFiber is used. To generate docs, use:
```
swag init --parseDependency --parseInternal
```Go to http://localhost:8080/swagger for seeing the documentation.
### Database Migrations
To create a new migration revision, use [Atlas provider](https://github.com/ariga/atlas-provider-gorm) for GORM:
```
atlas migrate diff --env gorm
```To apply the migration, use:
```
atlas migrate apply -u "postgres://postgres:postgres@localhost:5432/codereview?sslmode=disable"
```To downgrade:
```
atlas migrate down -u "postgres://postgres:postgres@localhost:5432/codereview" --env gorm
```### Docker
To run the app, simply use `docker-compose`:
```
docker-compose up --build
```### Local
In order to run the app locally, make sure that you have the following:
- Postgres database is up and running
- GoLang installed (1.21 version is used in the project)After making sure, please run the following to install the dependencies:
```bash
go mod download
```And then run the application with:
```bash
go run .
```After setting up you can go to http://localhost:8080/swagger to see available endpoints.