https://github.com/alex-schaaf/go-echo-sqlc-api-template
https://github.com/alex-schaaf/go-echo-sqlc-api-template
api go sqlc template
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alex-schaaf/go-echo-sqlc-api-template
- Owner: alex-schaaf
- License: mit
- Created: 2024-09-07T20:18:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-19T10:11:24.000Z (10 months ago)
- Last Synced: 2025-04-19T16:06:45.063Z (10 months ago)
- Topics: api, go, sqlc, template
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-echo-sqlc-api-template
A simple Go API project template built on the echo framework and sqlc.
## Key Features
- [Echo Framework](https://echo.labstack.com/): Fast and scalable web framework for building APIs.
- [SQLC](https://sqlc.dev/): Generate type-safe Go code from SQL queries.
- [SQLite](https://www.sqlite.org/):
- Database Migrations: Easily manage database schema changes with migration scripts.
- Authentication: JWT-based authentication with login, logout, and registration endpoints (via HTTP-only cookie).
- Configuration Management: Centralized configuration handling.
- Testing Utilities: Setup for in-memory database testing.
## Project Structure
- `api/`: Contains handlers for authentication and user management.
- `cmd/api/`: Entry point for the API server.
- `db/`: Database-related code
- `migrations/`: Contains the up/down database migration files.
- `sql`: Contains the `schema.sql` and `query.sql` used to generate SQLC code.
- `lib/`: Libraries for authentication, configuration, and middleware.
- `test/`: Utilities for setting up tests with an in-memory SQLite database.