A simple Go API project template built on the echo framework and sqlc.
- Echo Framework: Fast and scalable web framework for building APIs.
- SQLC: Generate type-safe Go code from SQL queries.
- SQLite:
- 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.
api/
: Contains handlers for authentication and user management.cmd/api/
: Entry point for the API server.db/
: Database-related codemigrations/
: Contains the up/down database migration files.sql
: Contains theschema.sql
andquery.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.