1- # goforge
1+ # Goforge
22
33Forge production-ready Go applications with security, observability, and best practices built-in.
44
55## 🚀 Installation
66
77### Option 1: Go Install (Recommended)
8+
89``` bash
910go install github.com/viveksharma/goforge@latest
1011```
1112
1213### Option 2: Download Binary
14+
1315Download pre-built binaries from the [ Releases] ( https://github.com/viveksharma/goforge/releases ) page.
1416
1517### Option 3: Build from Source
18+
1619``` bash
1720git clone https://github.com/viveksharma/goforge.git
1821cd goforge
@@ -37,6 +40,7 @@ Visit `http://localhost:8080/health/ready` to verify the API is running.
3740Every generated project includes:
3841
3942### 🔒 Security First
43+
4044- ** Security Headers** : HSTS, CSP, X-Frame-Options, X-Content-Type-Options
4145- ** Input Validation** : Path traversal protection, request validation
4246- ** No Sensitive Logging** : Credentials never appear in logs
@@ -46,12 +50,14 @@ Every generated project includes:
4650- ** Timeouts** : Request/connection timeouts prevent DoS
4751
4852### 📊 Observability
53+
4954- ** Structured Logging** : JSON logs with correlation IDs (zap)
5055- ** Health Checks** : Kubernetes-ready ` /health/live ` and ` /health/ready `
5156- ** Request Tracing** : Unique request IDs for log correlation
5257- ** Error Tracking** : Contextual error logging with stack traces
5358
5459### 🏗️ Production Ready
60+
5561- ** Fiber Web Framework** : High-performance HTTP server
5662- ** PostgreSQL** : Production-grade database with connection pooling
5763- ** Redis** : Caching layer with connection management
@@ -60,6 +66,7 @@ Every generated project includes:
6066- ** Environment Management** : Type-safe ` .env ` configuration
6167
6268### 🔧 Developer Experience
69+
6370- ** Make Commands** : Common tasks via Makefile
6471- ** Hot Reload Ready** : Easy integration with Air or CompileDaemon
6572- ** Clean Architecture** : Separation of concerns (handler/service/repository pattern ready)
@@ -105,6 +112,7 @@ your-project/
105112### Security Best Practices
106113
107114All generated code follows:
115+
108116- OWASP Top 10 protection
109117- Principle of least privilege
110118- Defense in depth
@@ -140,13 +148,13 @@ Generated projects are fully customizable:
140148
141149Every project includes these environment variables:
142150
143- | Variable | Description | Default |
144- | ----------| -------------| ---------|
145- | ` APP_ENV ` | Environment (development/production) | ` development ` |
146- | ` APP_PORT ` | HTTP server port | ` 8080 ` |
147- | ` DATABASE_URL ` | PostgreSQL connection string | Required |
148- | ` REDIS_URL ` | Redis connection string | Required |
149- | ` LOG_LEVEL ` | Logging level (debug/info/warn/error) | ` info ` |
151+ | Variable | Description | Default |
152+ | -------------- | ------------------------------------- | ------------- |
153+ | ` APP_ENV ` | Environment (development/production) | ` development ` |
154+ | ` APP_PORT ` | HTTP server port | ` 8080 ` |
155+ | ` DATABASE_URL ` | PostgreSQL connection string | Required |
156+ | ` REDIS_URL ` | Redis connection string | Required |
157+ | ` LOG_LEVEL ` | Logging level (debug/info/warn/error) | ` info ` |
150158
151159## 🚢 Deployment
152160
@@ -168,18 +176,21 @@ make test
168176```
169177
170178Add your tests in:
179+
171180- ` internal/handler/*_test.go `
172181- ` internal/service/*_test.go `
173182- ` pkg/*_test.go `
174183
175184## 📖 Examples
176185
177186### Create a basic API
187+
178188``` bash
179189goforge create my-api
180190```
181191
182192### What happens:
193+
1831941 . ✅ Creates project directory
1841952 . ✅ Generates all project files
1851963 . ✅ Sets up Fiber server
@@ -189,6 +200,7 @@ goforge create my-api
1892007 . ✅ Creates comprehensive README
190201
191202### Start developing immediately
203+
192204``` bash
193205cd my-api
194206make up
0 commit comments