@@ -23,30 +23,47 @@ go build -o goforge ./cmd/goforge
2323sudo mv goforge /usr/local/bin/
2424```
2525
26- ## 📖 Usage
26+ ## 📖 Quick Start
2727
28- Create a new project with your choice of web framework:
28+ ### Basic Usage
29+
30+ Create a new project in seconds:
2931
3032``` bash
31- # Using Fiber (high performance)
32- goforge create my-awesome-api --server fiber
33- # or shorthand
34- goforge create my-awesome-api -s fiber
35-
36- # Using Gin (popular, feature-rich)
37- goforge create my-awesome-api --server gin
38- # or shorthand
39- goforge create my-awesome-api -s gin
33+ # Create with Fiber (high performance)
34+ goforge create my-api -s fiber
35+
36+ # Create with Gin (feature-rich)
37+ goforge create my-api -s gin
4038```
4139
42- Then start developing:
40+ ### Custom Module Path (Optional)
41+
42+ By default, your Go module will be named after your project (e.g., ` module my-api ` ).
43+
44+ If you want a custom module path for GitHub/GitLab or organization projects:
4345
4446``` bash
45- cd my-awesome-api
47+ # With custom module path
48+ goforge create my-api -s fiber --module github.com/yourusername/my-api
49+
50+ # Short form
51+ goforge create my-api -s fiber -m github.com/viveksharma/my-api
52+ ```
53+
54+ ### Start Developing
55+
56+ ``` bash
57+ cd my-api
4658make up
4759```
4860
49- Visit ` http://localhost:8080/health/ready ` to verify the API is running.
61+ Your API is now running at ` http://localhost:8080 ` 🚀
62+
63+ ** Quick health check:**
64+ ``` bash
65+ curl http://localhost:8080/health/ready
66+ ```
5067
5168## ✨ What You Get
5269
@@ -214,57 +231,127 @@ Add your tests in:
214231
215232## 📖 Examples
216233
217- ### Create a Fiber-based API (default)
234+ ### Simple Project (Local Development)
235+
236+ For quick prototyping or local projects, use the simple syntax:
218237
219238``` bash
220- goforge create my-fiber- api
221- # or explicitly: goforge create my-fiber- api --server fiber
239+ goforge create my-api -s fiber
240+ # Result: go.mod → module my-api
222241```
223242
224- ### Create a Gin-based API
243+ ### GitHub/GitLab Project
244+
245+ For projects you'll push to GitHub or GitLab, specify the full module path:
225246
226247``` bash
227- goforge create my-gin-api --server gin
248+ goforge create my-api -s fiber -m github.com/yourusername/my-api
249+ # Result: go.mod → module github.com/yourusername/my-api
228250```
229251
230- ### What happens:
252+ ### Organization/Company Project
253+
254+ For company or organization projects:
255+
256+ ``` bash
257+ goforge create payment-service -s gin -m gitlab.company.com/backend/payment-service
258+ # Result: go.mod → module gitlab.company.com/backend/payment-service
259+ ```
260+
261+ ### What Happens When You Create a Project
231262
2322631 . ✅ Creates project directory
233- 2 . ✅ Generates all project files
234- 3 . ✅ Sets up your chosen web framework (Fiber or Gin)
235- 4 . ✅ Configures PostgreSQL and Redis
236- 5 . ✅ Adds health check endpoints
237- 6 . ✅ Sets up database migrations
238- 7 . ✅ Generates Swagger/OpenAPI docs
239- 8 . ✅ Adds Prometheus metrics endpoint
240- 9 . ✅ Includes Docker Compose
241- 10 . ✅ Creates comprehensive README
242- 11 . ✅ Runs ` go mod tidy ` automatically
243-
244- ### Start developing immediately
264+ 2 . ✅ Generates all project files with your chosen framework
265+ 3 . ✅ Sets up PostgreSQL database with connection pooling
266+ 4 . ✅ Configures Redis for caching
267+ 5 . ✅ Adds health check endpoints ( ` /health/live ` , ` /health/ready ` )
268+ 6 . ✅ Sets up database migrations system
269+ 7 . ✅ Generates Swagger/OpenAPI docs at ` /swagger/index.html `
270+ 8 . ✅ Adds Prometheus metrics at ` /metrics `
271+ 9 . ✅ Includes Docker Compose for one-command startup
272+ 10 . ✅ Creates comprehensive README with all commands
273+ 11 . ✅ Downloads dependencies automatically
274+
275+ ### Start Coding Immediately
245276
246277``` bash
247- cd my-fiber-api # or my-gin-api
248- make up
278+ cd my-api
279+ make up # Starts PostgreSQL, Redis, and your API
280+ make logs # Watch the logs
281+
282+ # Test your API
249283curl http://localhost:8080/health/ready
284+ curl http://localhost:8080/metrics
285+
286+ # View API docs
287+ open http://localhost:8080/swagger/index.html
250288```
251289
252290## 🔀 Choosing a Framework
253291
254292### Use Fiber when:
255- - You need maximum performance and minimal memory footprint
256- - You prefer Express.js-like syntax and patterns
257- - Your application handles high concurrent loads
258- - You want the fastest request/response times
293+ - 🚀 You need ** maximum performance** and minimal memory footprint
294+ - 💚 You prefer ** Express.js-like** syntax and patterns
295+ - ⚡ Your application handles ** high concurrent loads**
296+ - 🏎️ You want the ** fastest** request/response times
259297
260298### Use Gin when:
261- - You prefer a mature, battle-tested framework
262- - You need extensive middleware ecosystem
263- - You want built-in validation and binding
264- - Your team is already familiar with Gin
299+ - 🛡️ You prefer a ** mature, battle-tested** framework
300+ - 🔧 You need ** extensive middleware** ecosystem
301+ - ✅ You want ** built-in validation** and binding
302+ - 👥 Your team is ** already familiar** with Gin
265303
266304** Both frameworks generate identical project structure and features** - the only difference is the web framework implementation.
267305
306+ ## 🎯 Module Path Guide
307+
308+ ### When to Use Default (No ` --module ` flag)
309+
310+ ``` bash
311+ goforge create my-project -s fiber
312+ ```
313+
314+ ✅ ** Perfect for:**
315+ - Quick prototypes and experiments
316+ - Learning projects
317+ - Local-only development
318+ - Tools and scripts that won't be shared
319+
320+ ** Result:** ` module my-project ` (simple and clean)
321+
322+ ### When to Use Custom Module Path
323+
324+ ``` bash
325+ goforge create my-project -s fiber -m github.com/username/my-project
326+ ```
327+
328+ ✅ ** Perfect for:**
329+ - Projects you'll push to GitHub/GitLab
330+ - Open source projects
331+ - Company/organization codebases
332+ - Projects with internal imports
333+
334+ ** Result:** ` module github.com/username/my-project `
335+
336+ ### Module Path Examples
337+
338+ ``` bash
339+ # GitHub
340+ goforge create api -s fiber -m github.com/viveksharma/api
341+
342+ # GitLab
343+ goforge create service -s gin -m gitlab.com/myorg/service
344+
345+ # Self-hosted GitLab
346+ goforge create payment -s fiber -m git.company.com/backend/payment
347+
348+ # Bitbucket
349+ goforge create auth -s gin -m bitbucket.org/team/auth
350+
351+ # Company domain
352+ goforge create users -s fiber -m go.company.com/services/users
353+ ```
354+
268355## 🤝 Contributing
269356
270357Contributions welcome! Please see [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for guidelines.
0 commit comments