Skip to content

Project Structure

Application Structure

Default Raiden project structure.

├── configs
│   ├── app.yaml          # App configuration file
│   └── modules/          # Module configuration file
│       ├── module_a.yaml
│       ├── module_b.yaml
│       └── ...
├── cmd
│   └── project-name
│       └── project_name.go    # Main project
│   └── apply/main.go
│   └── import/main.go
├── internal
│   ├── bootstrap
│   │   ├── route.go
│   │   ├── rpc.go
│   │   ├── roles.go
│   │   ├── models.go
│   │   └── storages.go
│   ├── controllers
│   │   └── hello.go    # Example controller
│   ├── roles           # ACL/RLS definition
│   │   ├── members.go
│   │   └── ...
│   ├── models          # All model will auto-sync
│   │   ├── users.go
│   │   └── ...
│   ├── rpc             # RPC
│   │   └── get_user.go
│   ├── topics          # Real-time
│   │   ├── notification.go
│   │   └── inbox.go
│   │
│   └── storages
│       └── avatar.go
├── build
│   └── state      # Bytecode containing raiden state
├── go.sum
└── go.mod

Module Structure

├── pkg
│   ├── controllers
│   │   ├── hello.go
│   │   └── ...
│   ├── rbac
│   │   ├── creator.go
│   │   ├── approver.go
│   │   └── ...
│   ├── models
│   │   ├── users.go
│   │   └── ...
│   ├── rpc
│   │   └── get_user.go
│   ├── topics
│   │   ├── notification.go
│   │   └── inbox.go
│   └── storages
│       └── avatar.go
├── go.sum
└── go.mod

Directories

configs

Default config directory. Including the default config app.yaml. For more information, read Config.

controllers

You can define route path, HTTP verb, request and response on the controllers. For more details read Controller.

models

You can database schema on models. The model definition will auto-synchronize with Supabase. For more details read Model.

roles

This directory contains ACL definition that can auto-sync with Supabase. For more details read Controller.

routes

This folder contains generated files by controlers.

Released under the MIT License.