- Docker
- PostgreSQL
- Go
migrate
tool for database migrationssqlc
for Go code generation from SQL queries- Protocol Buffers (
protoc
) for gRPC
First, create a Docker network for the application:
make network
To set up the PostgreSQL database, run:
make postgres
After the database container is running, create the xyfin
database:
make createdb
You can drop the database using:
make dropdb
To start the Xyfin server, use:
make server
To apply all database migrations, run:
make migrateup
To apply a single migration, use:
make migrateup1
To rollback all migrations:
make migratedown
To rollback a single migration:
make migratedown1
Generate Go code from SQL queries using:
make sqlc
To regenerate Protocol Buffers and gRPC code:
make proto
Run the test suite with:
make test
Generate mock implementations for testing:
make mock
Start a Redis container:
make redis
To start the Xyfin server with the necessary database connection, use the following command:
make run
This command starts the previously created Docker container for PostgreSQL and runs the Xyfin application.
To build database documentation:
make db_docs
To generate a SQL schema from the DBML:
make db_schema
- Evans CLI: gRPC CLI client for testing your gRPC services.
make evans
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to your branch.
- Create a new Pull Request.
Xyfin is licensed under the MIT License. See LICENSE for more information.