Skip to content

Commit c39a53a

Browse files
committed
fix: Readme
1 parent d4e5826 commit c39a53a

1 file changed

Lines changed: 30 additions & 45 deletions

File tree

README.md

Lines changed: 30 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A modern, minimalist URL shortener inspired by Google's internal golinks system.
99
- **Recursive Aliases**: Keywords can point to other keywords
1010
- **Usage Analytics**: Track popular queries and usage patterns
1111
- **Clean Architecture**: Modular, testable, and maintainable codebase
12-
- **Observability**: Built-in OpenTelemetry tracing and metrics
12+
- **Modern UI**: HTMX-powered interface with Dieter Rams-inspired design
1313
- **Containerized**: Ready-to-deploy Docker container
1414

1515
## Quick Start
@@ -32,13 +32,16 @@ open http://localhost:8080/homepage/
3232

3333
```bash
3434
# Install dependencies
35-
go mod download
35+
make deps
3636

3737
# Copy environment configuration
3838
cp env.example .env
3939

4040
# Run the application
41-
go run cmd/server/main.go
41+
make run
42+
43+
# Or run with hot reload (requires air)
44+
make dev
4245

4346
# Access the application
4447
open http://localhost:8080/homepage/
@@ -80,8 +83,6 @@ go github myproject # Search GitHub for "myproject"
8083
| `DATABASE_PATH` | `golinks.db` | SQLite database path |
8184
| `BASE_URL` | `http://localhost:8080` | Base URL for the service |
8285
| `ENVIRONMENT` | `development` | Environment (development/production) |
83-
| `SERVICE_NAME` | `golinks` | Service name for telemetry |
84-
| `SERVICE_VERSION` | `1.0.0` | Service version for telemetry |
8586

8687
### Creating Links
8788

@@ -113,8 +114,7 @@ internal/
113114
├── domain/ # Domain models and interfaces
114115
├── handlers/ # HTTP handlers and routing
115116
├── repository/ # Data access layer
116-
├── service/ # Business logic layer
117-
└── telemetry/ # Observability setup
117+
└── service/ # Business logic layer
118118
web/
119119
├── static/ # CSS, images, and static assets
120120
└── templates/ # HTML templates
@@ -135,30 +135,6 @@ The UI follows Dieter Rams' principles of good design:
135135
- **Environmentally friendly**: Efficient, lightweight implementation
136136
- **Minimal**: Only essential elements, nothing superfluous
137137

138-
## Observability
139-
140-
### Tracing
141-
142-
The application includes OpenTelemetry tracing:
143-
144-
```bash
145-
# Start with Jaeger
146-
docker-compose --profile observability up -d
147-
148-
# View traces at http://localhost:16686
149-
```
150-
151-
### Metrics
152-
153-
Prometheus metrics are available at `/metrics`:
154-
155-
```bash
156-
# Start with Prometheus
157-
docker-compose --profile observability up -d
158-
159-
# View metrics at http://localhost:9090
160-
```
161-
162138
## Development
163139

164140
### Project Structure
@@ -167,29 +143,34 @@ docker-compose --profile observability up -d
167143
- **Service Layer**: Use cases and business rules
168144
- **Repository Layer**: Data access and persistence
169145
- **Handler Layer**: HTTP transport and presentation
170-
- **Infrastructure**: Database, telemetry, and external services
146+
- **Infrastructure**: Database and external services
171147

172-
### Testing
148+
### Development Commands
173149

174150
```bash
175-
# Run tests
176-
go test ./...
151+
# Format and check code
152+
make fmt
177153

178-
# Run tests with coverage
179-
go test -cover ./...
154+
# Fix formatting and linting issues
155+
make fix
180156

181-
# Run integration tests
182-
go test -tags=integration ./...
183-
```
157+
# Run linter
158+
make lint
184159

185-
### Building
160+
# Run tests with coverage
161+
make test
186162

187-
```bash
188163
# Build binary
189-
go build -o golinks cmd/server/main.go
164+
make build
190165

191166
# Build Docker image
192-
docker build -t golinks .
167+
make docker-build
168+
169+
# Run all CI checks
170+
make ci
171+
172+
# Clean build artifacts
173+
make clean
193174
```
194175

195176
## Deployment
@@ -198,7 +179,11 @@ docker build -t golinks .
198179

199180
```bash
200181
# Production deployment
201-
docker-compose -f docker-compose.yml up -d
182+
docker-compose up -d
183+
184+
# Or using make commands
185+
make docker-build
186+
make docker-run
202187
```
203188

204189
### Environment Variables for Production

0 commit comments

Comments
 (0)