![RealWorld Example App](https://github.com/aliml92/realworld-gin-sqlc/raw/f01271b55086/logo.jpg)
![](https://img.shields.io/badge/License-MIT-yellow.svg)
Golang/Gin codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Gin including CRUD operations, authentication, routing, pagination, and more.
How it works
![Diagram](https://github.com/aliml92/realworld-gin-sqlc/raw/f01271b55086/diagram.png)
- The project uses:
- Also uses:
- PostgreSQL for the database
- Elasticsearch for the search engine (optional, to be implemented)
- Typesense for the search engine
Getting started
Running the project locally:
docker-compose up -d // starts postgres container
go run main.go
Project starts on port 8085 by default and swagger documentation is available at http://localhost:8085/swagger/index.html.
E2E testing
First, run:
make test-run
This will start postgres container and the project itself. Then, run the tests with:
make e2e-test
Unit testing
make unit-test
TODO
- Add unit tests for handlers (... in progress)
- Improve error handling and logging
- Improve deployment and testing configuration (Makefile, docker-compose, etc.) ( ... in progress)
- Add search feature (
/search
, ...)