Gemquick is a modern, full-featured web application framework for Go that provides everything you need to build scalable web applications quickly and securely.
- π Chi Router - Fast and lightweight HTTP router
- ποΈ Multi-Database Support - PostgreSQL, MySQL, MariaDB, SQLite
- π Security First - CSRF protection, rate limiting, input validation, XSS prevention
- π§ Email System - Multiple provider support with templates
- πΎ Caching - Redis and Badger cache implementations
- π Background Jobs - Job queue with cron scheduler
- π WebSocket Support - Real-time communication with hub pattern
- π File Storage - S3 and MinIO filesystem integrations
- π± SMS Integration - Multiple SMS provider support
- π¨ Template Engine - Jet template engine for dynamic views
- π Logging & Metrics - Structured logging with health monitoring
- π Session Management - Secure session handling with multiple stores
- π οΈ CLI Tools - Project scaffolding and code generation
Clone the repository and build the CLI tool:
git clone https://github.com/jimmitjoo/gemquick
cd gemquick
make build
This will create the gq
executable in dist/gq
. You can move this file to your PATH for global access.
gq new my_project
cd my_project
make start
my_project/
βββ .env # Environment configuration
βββ Makefile # Build and development commands
βββ handlers/ # HTTP handlers
βββ migrations/ # Database migrations
βββ views/ # Template files
βββ email/ # Email templates
βββ data/ # Models and database logic
βββ public/ # Static assets
βββ middleware/ # Custom middleware
βββ logs/ # Application logs
make key # Generate new encryption key
make auth # Create authentication system with user model
make mail # Create new email template
make model # Create new model in data directory
make migration # Create new database migration
make handler # Create new HTTP handler
make session # Create session tables in database
make api-controller # Create new API controller
make controller # Create new resource controller
make middleware # Create new middleware
make docker # Generate Docker configuration
make deploy # Generate deployment configuration
Gemquick includes a beautiful test runner with colored output:
# Run all tests with colors
make test
# Run tests for specific package
./run-tests -p ./cache/...
# Generate coverage report
make cover
# Run tests without Docker dependencies
./run-tests -s
# Run migrations up
gq migrate up
# Roll back migrations
gq migrate down
# Create new migration
make migration name=create_users_table
app := gemquick.Gemquick{}
app.New(rootPath)
app.AppName = "MyApp"
app.Debug = true
Supports multiple databases through environment configuration:
- PostgreSQL
- MySQL/MariaDB
- SQLite
Choose between Redis or Badger cache:
// Redis cache
app.Cache = app.CreateRedisCache()
// Badger cache
app.Cache = app.CreateBadgerCache()
// Register a job processor
app.JobManager.RegisterProcessor("send-email", emailProcessor)
// Queue a job
app.JobManager.QueueJob("send-email", data)
// Initialize WebSocket hub
hub := websocket.NewHub()
go hub.Run()
- CSRF protection middleware
- Rate limiting and throttling
- Input validation and sanitization
- SQL injection prevention
- XSS protection
- Session fixation protection
- Secure password hashing
Configuration is managed through .env
file:
# Application
APP_NAME=MyApp
DEBUG=true
PORT=4000
# Database
DATABASE_TYPE=postgres
DATABASE_DSN=your_connection_string
# Cache
CACHE=redis
REDIS_HOST=localhost:6379
# Session
SESSION_TYPE=redis
SESSION_LIFETIME=24
# Mail
MAIL_PROVIDER=smtp
SMTP_HOST=localhost
SMTP_PORT=1025
Gemquick includes API utilities for building RESTful services:
- Version management
- Standardized JSON responses
- API middleware
- Error handling
// API versioning
api.Version("v1", func(r chi.Router) {
r.Get("/users", handlers.GetUsers)
})
// JSON responses
api.JSON(w, http.StatusOK, data)
- Comprehensive test coverage (aim for >80% on critical paths)
- Table-driven tests for better coverage
- Security-focused testing
- Docker-optional test execution
- Colorful test output for better readability
Bug reports and pull requests are welcome on GitHub at the Gemquick repository. This project is intended to be a safe, welcoming space for collaboration. Contributors are expected to adhere to the Contributor Covenant.
The Gemquick framework is available as open source under the terms of the MIT License.
For detailed documentation and examples, see:
- TESTING.md - Complete testing guide
- CLAUDE.md - AI assistant integration guide
- Examples - Sample implementations
For issues, questions, or suggestions, please open an issue on the GitHub repository.