Skip to content

Commit 120a37b

Browse files
committed
chore: update Readme.md
1 parent 1ac56e1 commit 120a37b

File tree

2 files changed

+48
-21
lines changed

2 files changed

+48
-21
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
# Envfile
1010
.env
11+
.DS_Store

Readme.md

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,55 @@
1-
# Short
2-
3-
## Prerequisites
4-
5-
Installed:
6-
- npm
7-
- go
8-
- templ
9-
- air
10-
11-
## Install dependencies
12-
1+
# Short - URL Shortener Service
2+
3+
A modern, efficient URL shortener service built with Go and featuring a clean web interface. This application allows users to create short, memorable links from long URLs while providing analytics and tracking capabilities.
4+
5+
## Features
6+
7+
- **URL Shortening**: Convert long URLs into short, manageable links
8+
- **Analytics Tracking**: Monitor link usage with detailed analytics including:
9+
- Visitor country (using Cloudflare headers)
10+
- Referrer tracking
11+
- IP address logging
12+
- Timestamp tracking
13+
- **Performance Optimized**:
14+
- LRU caching for frequently accessed URLs
15+
- Efficient database queries
16+
- Fast redirect handling
17+
- **Security Features**:
18+
- Admin authentication system
19+
- Secure token handling
20+
- Environment-based configuration
21+
22+
## Technical Stack
23+
24+
- **Backend**: Go (Golang)
25+
- **Database**: SQL database for persistent storage
26+
- **Caching**: HashiCorp's LRU cache for performance optimization
27+
- **Infrastructure**: Docker support for easy deployment
28+
- **Development**: Hot-reload support with Air
29+
30+
## Getting Started
31+
32+
1. Clone the repository
33+
2. Copy `example.env` to `.env` and configure your environment variables
34+
3. Run the application:
35+
```bash
36+
go run cmd/short/main.go
37+
```
38+
39+
## Development
40+
41+
The project uses Air for hot-reloading during development. Start the development server with:
1342
```bash
14-
go install github.com/a-h/templ/cmd/templ@latest
43+
air
1544
```
1645

17-
```bash
18-
go install github.com/air-verse/air@latest
19-
```
46+
## Building
2047

48+
Build the application using Docker:
2149
```bash
22-
npm install
50+
docker build -t short .
2351
```
2452

25-
## Run
53+
## License
2654

27-
```bash
28-
air
29-
```
55+
This project is open source and available under the MIT License.

0 commit comments

Comments
 (0)