GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codoworks/codo-framework: Production ready go framework

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
clients
clients
 
 
cmd
cmd
 
 
core
core
 
 
docs
docs
 
 
examples
examples
 
 
testutil
testutil
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
framework.go
framework.go
 
 
framework_test.go
framework_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

Codo Framework

A production-ready Go backend framework with multi-router HTTP architecture, database abstraction, and authentication integrations.

Installation

go get github.com/codoworks/codo-framework

Quick Start

package main

import (
    "github.com/codoworks/codo-framework/core/config"
    "github.com/codoworks/codo-framework/core/db"
    "github.com/codoworks/codo-framework/core/http"
)

func main() {
    // Load configuration
    cfg, _ := config.Load()

    // Connect to database
    dbClient, _ := db.NewClient(cfg.Database)

    // Register handlers
    http.RegisterHandler(NewUserHandler(dbClient))

    // Start server
    router := http.NewRouter(http.ScopeProtected, cfg)
    router.Start()
}

Multi-Router Architecture

Three independent routers for Kubernetes ingress separation:

Router Port Scope Purpose
Public 8081 http.ScopePublic Health checks, public endpoints
Protected 8080 http.ScopeProtected User-facing API (requires auth)
Hidden 8079 http.ScopeHidden Admin/internal endpoints

Core Packages

Package Description
core/config Configuration loading (env, files)
core/db Database client, repository pattern, migrations
core/http Router, handlers, middleware, context
core/auth Ory Kratos/Keto integration
testutil Testing utilities for handlers

Creating a Handler

type UserHandler struct {
    service *UserService
}

func (h *UserHandler) Prefix() string           { return "/api/v1/users" }
func (h *UserHandler) Scope() http.RouterScope  { return http.ScopeProtected }
func (h *UserHandler) Middlewares() []echo.MiddlewareFunc { return nil }
func (h *UserHandler) Initialize() error        { return nil }

func (h *UserHandler) Routes(g *echo.Group) {
    g.GET("", http.WrapHandler(h.List))
    g.POST("", http.WrapHandler(h.Create))
    g.GET("/:id", http.WrapHandler(h.Get))
}

CLI Commands

codo serve              # Start all servers
codo start public       # Start public server only
codo start protected    # Start protected server only
codo db migrate         # Run migrations
codo db rollback        # Rollback migrations
codo db seed            # Run seeds
codo info routes        # Show registered routes
codo info env           # Show environment info

Documentation

Full documentation: Coming soon

License

MIT

About

Production ready go framework

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.