Getting Started

1. Create a project#

BASH
ctg new online-store
cd online-store

Run ctg new without a name to use the interactive installer. Choose the database and frontend preset for your application.

2. Configure the database#

Edit .env with your local credentials. MySQL example:

DOTENV
DB_DRIVER=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=app
DB_USERNAME=app
DB_PASSWORD=your-local-password
BASH
ctg key:generate
ctg db:check
ctg migrate

3. Run the application#

BASH
ctg doctor
ctg dev

Open the application URL printed by the CLI (default: http://127.0.0.1:8080). For frontend development, ctg dev starts Vite alongside the Go application. Vite reloads TypeScript changes; restart after changing Go code.

4. Add features#

Install authentication before generating private resources. Open Studio with ctg studio.

BASH
ctg route:list
ctg build

The application build produces a native binary and frontend assets. This documentation website has a separate Vite + TypeScript build process.


Versioned sources v5.0.0: README.md · docs/INDEX.md · docs/PRODUCTION.md.

Search documentation

Type to search the documentation.