A batteries-included Go framework for backend services — HTTP, SQL, MongoDB,
cache, queues, jobs, storage, mail, push, AI and observability behind one
consistent context, with an in-memory implementation of every capability, so
tests need no mocks.
go get github.com/pskclub/mine-core/v2env, _ := core.NewEnv()
db, _ := core.NewDatabase(env)
redis, _ := core.NewCache(env)
app, _ := core.NewApp(env,
core.WithSQL("default", db),
core.WithCache("default", redis),
)
defer app.Shutdown(context.Background())
e := core.NewHTTPServer(app, &core.HTTPOptions{AllowOrigins: []string{"*"}})
e.POST("/users", controller.CreateUser)
core.StartHTTPServer(e, env)The full walkthrough, with a validated controller, is in Getting started.
Starting a new service? mine-core-template
is a complete one to copy — modules, api/worker roles, Prisma migrations, tests and
CI — ready for gonew:
go run golang.org/x/tools/cmd/gonew@latest github.com/pskclub/mine-core-template github.com/acme/orders| Capability | Built on |
|---|---|
| HTTP server, routing, binding, validation | Echo v5 |
| SQL repositories | GORM — Postgres, MySQL, SQL Server, Oracle, SQLite |
| MongoDB repositories and aggregation | mongo-driver v2 |
| Cache, distributed locks, counters | go-redis v9, or in-memory |
| Message queue | RabbitMQ (amqp091) |
| Pub/sub | Redis, or in-memory |
| Jobs, cron, durable job store | gocron v2 |
| Object storage, presigned URLs | AWS SDK v2 — S3, MinIO — or in-memory |
| Mail and push notifications | go-mail, Firebase |
| AI — text, typed output, tools, streaming, embeddings | multi-provider, or in-memory |
| Errors, logging, tracing | slog, Sentry |
| Health probes, graceful shutdown, dev tools | built in |
| Postman and OpenAPI generation | go tool postmangen |
The framework documentation lives in v2/docs/ and is written in
Thai. Good places to start:
- Why v2 — what changed from v1, and why
- Getting started — wiring and a full controller
- Architecture — the App, the context, and the path of a request
- Testing — unit, integration and end-to-end
- Deployment — images, config, probes, shutdown
- Migrating from v1
The complete index is in v2/README.md. API reference: pkg.go.dev.
| Module | Import path | Status |
|---|---|---|
| v2 | github.com/pskclub/mine-core/v2 |
✅ Active — all new development |
| v1 | github.com/pskclub/mine-core |
Both modules live in this repository: v2 under v2/, v1 at the root.
They are versioned and released independently. If you are on v1, the
migration guide walks through the move.
Contributions are welcome — bug reports, docs fixes and code alike.
- CONTRIBUTING.md — setup, tests, conventions and the PR process
- Code of Conduct
- Security policy — please report vulnerabilities privately
make help # list the development targets
make check # run what the required CI checks run