Skip to content

Backend Development ​

Go backend development guide.

Sections ​

TopicDescription
Project StructureDirectory organization
ModelsGo struct patterns for database entities
DTOsRequest/Response data transfer objects
Handlers & ServicesHTTP handlers and business logic
AuthenticationSession authentication middleware
MigrationsDatabase migration scripts

Key Patterns ​

Domain Module Structure ​

Each domain follows a consistent 6-file pattern:

internal/domain/{name}/
├── model.go       # Database entity structs
├── dto.go         # Request/Response DTOs with validation
├── repository.go  # Data access layer (SQL queries)
├── service.go     # Business logic layer
├── handler.go     # HTTP request handlers
└── routes.go      # Route registration

Quick Reference ​

Each domain follows a consistent 6-file pattern documented in the sections below.

Student Information System Documentation