Skip to content

Commit e5d1c5b

Browse files
rameshsunkaraRamesh Sunkara
andauthored
chore: Update readme with clear instructions (#73)
* chore: Update readme with clear instructions * update tools and stack --------- Co-authored-by: Ramesh Sunkara <rs@rsunkara.com>
1 parent 2515498 commit e5d1c5b

File tree

1 file changed

+32
-29
lines changed

1 file changed

+32
-29
lines changed

README.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ curl http://localhost:8080/healthz
3333
## 📋 Table of Contents
3434

3535
- [Features](#-key-features)
36-
- [Architecture](#-folder-structure)
37-
- [Getting Started](#get-started)
38-
- [Commands](#quickstart)
39-
- [Tools](#tools)
36+
- [Architecture](#️-architecture)
37+
- [Getting Started](#-getting-started)
38+
- [Available Commands](#-available-commands)
39+
- [Tools & Stack](#-tools--stack)
4040
- [Contributing](#contribute)
4141

4242
## 🎯 Key Features
@@ -89,7 +89,9 @@ curl http://localhost:8080/healthz
8989
3. **GitHub Actions**: Automates building, testing, code coverage reporting, and enforces the required test coverage threshold.
9090
4. **Multi-Stage Docker Build**: Accelerates build processes.
9191

92-
## Folder Structure
92+
## 🏗️ Architecture
93+
94+
### 📁 Folder Structure
9395

9496
```text
9597
go-rest-api-example/
@@ -115,7 +117,7 @@ go-rest-api-example/
115117
└── OpenApi-v1.postman_collection.json
116118
```
117119

118-
## Control Flow
120+
### ➡️ Control Flow
119121

120122
```mermaid
121123
flowchart LR
@@ -144,7 +146,14 @@ flowchart LR
144146
5. **Handlers**: The request is passed to the appropriate handler, which validates the request and forwards it to the repository layer.
145147
6. **Repos(DAO)**: The repository layer communicates with the database to perform CRUD operations.
146148

147-
## Get Started
149+
## 🚀 Getting Started
150+
151+
### Prerequisites
152+
153+
- Docker and [Docker Compose](https://docs.docker.com/compose/install/)
154+
- Make
155+
156+
### Start the Application
148157

149158
```bash
150159
git clone https://github.com/rameshsunkara/go-rest-api-example.git
@@ -154,47 +163,35 @@ make start
154163

155164
Your API is now running at `http://localhost:8080`
156165

157-
Try it out:
166+
**Try it out:**
158167
```bash
159168
curl http://localhost:8080/api/v1/healthz
160169
curl http://localhost:8080/api/v1/orders
161170
```
162171

163-
## QuickStart
172+
## 📟 Available Commands
164173

165-
### Pre-requisites
166-
167-
- Docker
168-
- [Docker Compose](https://docs.docker.com/compose/install/)
169-
- Make
170-
- [golangci-lint](https://golangci-lint.run/welcome/install/#local-installation)
171-
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/)
172-
173-
### Frequently used commands
174+
### Essential Commands
174175

175176
```makefile
176177
start Start all necessary services and API server
177-
run Run the API server
178-
setup Start only dependencies
178+
run Run the API server (requires dependencies running)
179+
setup Start only dependencies (MongoDB)
179180
test Run tests with coverage
180181
```
181182

182-
### Development commands
183+
### Development Commands
183184

184185
```makefile
185186
lint Run the linter
186187
lint-fix Run the linter and fix issues
187188
trace Analyze a trace file (usage: make trace TRACE_FILE=./traces/slow-request-GET-orders-1234567890.trace)
188189
clean Clean all Docker resources (keeps database data)
189190
clean-all Clean all Docker resources including volumes (removes database data)
190-
clean-volumes Remove only the docker-compose volumes (database data)
191191
coverage Generate and display the code coverage report
192-
go-work Generate Go work file
193-
owasp-report Generate OWASP report
194-
tidy Tidy Go modules
195192
```
196193

197-
### CI commands
194+
### CI/CD Commands
198195

199196
```makefile
200197
build Build the API server binary
@@ -203,25 +200,31 @@ format Format Go code
203200
version Display the current version of the API server
204201
```
205202

206-
### Docker commands
203+
### Docker Commands
207204

208205
```makefile
209206
docker-build Build the Docker image
210207
docker-start Build and run the Docker container
211208
docker-clean Clean all Docker resources
212209
```
213210

214-
> 💡 **Tip**: Run `make help` to see all available commands including additional Docker operations.
211+
> 💡 **Tip**: Run `make help` to see all available commands.
212+
213+
### Additional Prerequisites for Development
214+
215+
- [golangci-lint](https://golangci-lint.run/welcome/install/#local-installation) - For linting
216+
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/) - For multi-platform builds
215217

216218
## 🛠 Tools & Stack
217219

218220
| Category | Technology |
219221
|----------|-----------|
220-
| **Framework** | [Gin](https://github.com/gin-gonic/gin) |
222+
| **Web Framework** | [Gin](https://github.com/gin-gonic/gin) |
221223
| **Logging** | [zerolog](https://github.com/rs/zerolog) |
222224
| **Database** | [MongoDB](https://www.mongodb.com/) |
223225
| **Container** | [Docker](https://www.docker.com/) + BuildKit |
224226
| **Tracing** | Go 1.25 Flight Recorder |
227+
| **Profiling** | [pprof](https://golang.org/pkg/net/http/pprof/) |
225228

226229
## 📚 Additional Resources
227230

0 commit comments

Comments
 (0)