Minimalist Bookmark Management Service - Make Link Collection Simple
Features β’ Quick Start β’ API Docs β’ Deployment
ForgetURL is a modern bookmark management platform that helps users easily save, organize, and share web links. With a clean, elegant interface and powerful backend service, link collection becomes effortless.
Why ForgetURL?
- π― Minimalist Design - Focus on core features, no bloat
- π Secure & Reliable - Support multiple OAuth providers
- π Flexible Sharing - Multi-level permission control for different sharing scenarios
- π¦ Seamless Migration - Import/export bookmarks for easy data migration
- Support Google, GitHub and other OAuth providers
- Secure token-based authentication
- User profile management
- Create Pages - Quickly create bookmark collection pages
- Edit Pages - Real-time editing of title, description, and link collections
- Delete Pages - Safely remove unwanted pages
- Sort Pages - Customize page order
- Link Collections - Group related links together
- Tagging System - Add tags to links for easy filtering
- Sub-links - Attach related sub-links to main links
| Link Type | Prefix | Permission |
|---|---|---|
| Read-only | R |
View only, no editing |
| Editable | E |
View and edit content |
| Admin | A |
Full control permissions |
- Import bookmarks from browsers
- Export to universal formats
| Category | Technology |
|---|---|
| Language | Go 1.23 |
| Web Framework | Gin |
| ORM | GORM + Gen |
| Database | MySQL |
| Cache | Redis |
| API Spec | Protocol Buffers / gRPC |
| Container | Docker |
| Auth | Goth (OAuth) |
forgeturl-server/
βββ app/
β βββ api/ # API Layer
β β βββ proto/ # Protobuf definitions
β β β βββ space.proto # Space management API
β β β βββ login.proto # Authentication API
β β β βββ dumplinks.proto # Import/Export API
β β βββ space/ # Generated space service code
β β βββ login/ # Generated login service code
β β βββ docs/ # Swagger documentation
β βββ cmd/ # CLI entry points
β βββ conf/ # Configuration files
β βββ dal/ # Data Access Layer
β β βββ model/ # Data models
β β βββ query/ # GORM Gen queries
β βββ pkg/ # Shared packages
β β βββ connector-google/ # Google OAuth connector
β β βββ core/ # Core utilities
β β βββ lcache/ # Local cache
β β βββ maths/ # Math utilities (ID generation)
β β βββ middleware/ # Middlewares
β βββ route/ # Router configuration
β βββ main.go # Main entry point
β βββ go.mod # Go module definition
βββ tests/ # Test files
βββ Dockerfile # Docker build file
βββ README.md
- Go 1.23+
- MySQL 5.7+
- Redis 6.0+
# 1. Clone the repository
git clone https://github.com/your-username/forgeturl.git
cd forgeturl/forgeturl-server
# 2. Install dependencies
cd app
go mod download
# 3. Configure environment
cp conf/local.toml.example conf/local.toml
# Edit conf/local.toml to configure database and Redis connection
# 4. Start the server
go run main.go api startServer runs at http://127.0.0.1:80 by default.
# Build image
docker build -t forgeturl-server .
# Run container
docker run -d -p 80:80 forgeturl-serverAll endpoints requiring authentication need the Token in request header:
X-Token: your_access_token| Endpoint | Method | Description | Auth Required |
|---|---|---|---|
/space/getUserInfo |
POST | Get user info | Optional |
/space/getMySpace |
POST | Get my space | β |
/space/getPage |
POST | Get page details | Optional |
/space/createPage |
POST | Create page | β |
/space/updatePage |
POST | Update page | β |
/space/deletePage |
POST | Delete page | β |
/space/savePageIds |
POST | Save page order | β |
/space/addPageLink |
POST | Generate share link | β |
/space/removePageLink |
POST | Remove share link | β |
| Endpoint | Method | Description |
|---|---|---|
/auth/{provider} |
GET | OAuth authorization redirect |
/callback/{provider} |
GET | OAuth callback handler |
/login/logout |
POST | Logout |
| Endpoint | Method | Description |
|---|---|---|
/dumplinks/importBookmarks |
POST | Import bookmarks |
/dumplinks/exportBookmarks |
POST | Export bookmarks |
Get User Info
curl 'http://127.0.0.1:80/space/getUserInfo' \
-d '{"uid": 1}' \
-H 'Content-Type: application/json'Get My Space
curl 'http://127.0.0.1:80/space/getMySpace' \
-d '{}' \
-H 'Content-Type: application/json' \
-H 'X-Token: your_token'Create Page
curl 'http://127.0.0.1:80/space/createPage' \
-d '{
"title": "My Bookmarks",
"brief": "Frequently used links",
"collections": [
{
"title": "Dev Tools",
"links": [
{
"title": "GitHub",
"url": "https://github.com",
"tags": ["code", "opensource"]
}
]
}
]
}' \
-H 'Content-Type: application/json' \
-H 'X-Token: your_token'Update Page
curl 'http://127.0.0.1:80/space/updatePage' \
-d '{
"page_id": "O3sFmpq",
"title": "Updated Title",
"brief": "Updated description",
"collections": [...],
"version": 0,
"mask": 7
}' \
-H 'Content-Type: application/json' \
-H 'X-Token: your_token'Update Mask Values:
0x01(1): Update title0x02(2): Update description0x04(4): Update collections0x07(7): Update all fields
Generate Share Link
curl 'http://127.0.0.1:80/space/addPageLink' \
-d '{
"page_id": "O3sFmpq",
"page_type": "readonly"
}' \
-H 'Content-Type: application/json' \
-H 'X-Token: your_token'page_type Options:
readonly- Read-only linkedit- Editable linkadmin- Admin link
The project supports three environments:
| Environment | Config File | API Address |
|---|---|---|
| Local | local.toml |
http://127.0.0.1:80 |
| Test | test.toml |
https://test-api.brightguo.com |
| Production | onl.toml |
https://api.brightguo.com |
# Generate API code (from proto files)
./genapi.sh
# Generate GORM models and queries
cd dal && ./gensql.shcd tests
pip install -r requirements.txt
python run_tests.pyThis project is licensed under the MIT License - see the LICENSE file for details.
Issues and Pull Requests are welcome!
Made with β€οΈ by ForgetURL Team