https://github.com/tokiory/exp.dev-bkend
π¦ Backend for exp.dev service
https://github.com/tokiory/exp.dev-bkend
backend go postgres
Last synced: 7 months ago
JSON representation
π¦ Backend for exp.dev service
- Host: GitHub
- URL: https://github.com/tokiory/exp.dev-bkend
- Owner: tokiory
- Created: 2025-06-22T20:36:50.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-06-27T02:27:23.000Z (7 months ago)
- Last Synced: 2025-06-27T03:25:59.782Z (7 months ago)
- Topics: backend, go, postgres
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
β¨[bkend] exp.devβ¨
A backend for a exp.dev project
# Docker
To utilize infrastructure, use the following command:
```bash
docker compose up -d database migration
```
To run the application and the infrastructure, use:
```bash
docker compose up -d
```
To stop app and (or) infrastructure, use:
```bash
docker compose down
```
# Tools
- [`sqlc`](https://github.com/kyleconroy/sqlc): For generating db package code from SQL
- [`goose`](https://github.com/pressly/goose): For migrations
## SQL Generation
This application uses `sqlc` to generate Go code from SQL queries. To generate the code, run:
```bash
sqlc generate -f ./db/sqlc.yaml
```
This command will read the SQL files in the `db/migration` and `db/queries` directories and generate the corresponding Go code in the `db/report` directory.
## Migrations
All migrations are located in the `db/migration` directory. To apply migrations, use:
```bash
make migrate_up
```
# Architecture
1. We use immutable database records of reports to keep progress of every engineer;
2. This approach provide us a great way to analyze every developer path, 'cause we can simple `SELECT` all developers reports via SQL;