A lightweight backend system built in Go designed to simplify the management and access to data through APIs. An example model, migration and controller have been provided for demonstration purposes
- Database Migrations: Easily create, manage, and rollback database migrations using simple command-line operations.
- ORM: A simple ORM that allows you to interact with the database using Go structs (XORM).
- API Controllers: Facilitate and manage RESTful APIs that enable clients to interact with the backend.
- Go (version 1.22 or higher)
- A PostgreSQL Database
Clone the repository
git clone https://github.com/lytexdev/Gyad.git
Rename the .env.example
file to .env
and adjust the values
cp .env.example .env
Run the web server
go run cmd/main.go
Create Migration
go run cmd/migration/migration.go create bober
Run all migrations:
go run cmd/migration/migration.go migrate all
Migrations are executed one after the other based on the timestamps.
Run specific migratrion:
go run cmd/migration/migration.go migrate bober
Rollback specific migration:
go run cmd/migration/migration.go rollback bober
Create migration binary file:
go build cmd/migration/migration.go
This project is licensed under the MIT License. See the LICENSE file for details.