Stack
Go RESTful API Stack w/ MongoDB
Install / Use
/learn @ilgooz/StackREADME
Stack 
Stack is a lightweight not-a-framework RESTful API that allow you to easily get started with your next project and show some of the my best practices about building RESTful APIs in Go.

What is included?
- Proper using of middlewares
- Learn how to organize your files & folders structure
- User & Token APIs out of the box
- Authentication via tokens
- Keep context by *http.Request with gorilla/context
- Form parsing with gorilla/schema & validation with go-playground/validator
- MongoDB with go-mgo/mgo
- Command-line configuration
- App versioning over latest git commit hash
- ...
Usage
Run
make run
Run via Docker Compose
docker-compose up
Stop
^C ctrl+c
Hard Stop
^C^C twice
Out of The Box Endpoints
- post /users
- get /users
- get /users/{id}
- get /me
- post /tokens
- delete /tokens
- delete /tokens/{token}
- get /version
Authentication
Send your access_token over X-Auth-Token header
For more information read the source code and do requests on endpoints
Best practices resources about building APIs
- GopherCon 2015: Blake Caldwell - Uptime: Building Resilient Services with Go https://www.youtube.com/watch?v=PyBJQA4clfc
Contribute
- Share your ideas by opening new issues
- Feel free to ask for feature requests
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
