MindShelf is a personal link management system that allows users to save, organize, and search bookmarks.
- User authentication (login/register)
- Save links with titles, descriptions, and tags
- Automatic metadata extraction when adding links
- Full-text search functionality for finding links quickly
- Tag-based organization and filtering
- Responsive web interface with dark mode support
- Keyboard shortcuts for power users
- RESTful API with JWT authentication
- Multi-container Docker orchestration
MindShelf uses a modern, containerized architecture:
- Frontend: Minimalistic UI built with Alpine.js - a lightweight JavaScript framework with no build step
- Backend API: Go (Chi router) providing RESTful endpoints
- Database: MongoDB for data storage
- Reverse Proxy: Nginx for routing, SSL termination, and serving static files
- Docker and Docker Compose
- Go 1.24+ (for local development without Docker)
- OpenSSL (for generating self-signed certificates)
-
Clone the repository:
git clone https://github.com/yourusername/mindshelf.git cd mindshelf -
Create a
.envfile:cp .env.example .envEdit the
.envfile and set your desired configuration values. -
Run the setup script:
./mindshelf.sh setup -
Access the application at https://localhost
./mindshelf.sh start- Start the development environment./mindshelf.sh stop- Stop the development environment./mindshelf.sh logs- View logs from all services./mindshelf.sh logs api- View logs only from the API service./mindshelf.sh build- Rebuild the Docker images
make dev- Start development environmentmake dev-stop- Stop development environmentmake logs- View logsmake test- Run testsmake clean- Clean up build artifacts
If you prefer to run the Go server directly:
- Install MongoDB locally or use a remote instance
- Update your
.envfile with the correct MongoDB connection URI - Run the server:
make run
-
Ensure you have proper SSL certificates for your domain
-
Place your SSL certificates in
docker/nginx/certs/:- Certificate:
cert.pem - Private key:
privkey.pem
- Certificate:
-
Update the Nginx configuration in
docker/nginx/nginx.prod.confwith your domain name -
Run the deployment script:
sudo ./deploy-prod.sh
-
Build for production:
make build-prod -
Start the production stack:
docker-compose -f docker-compose.prod.yml up -d
-
View production logs:
make logs-prod -
Stop production services:
docker-compose -f docker-compose.prod.yml down -
Backup the database:
make db-backup -
Restore from a backup:
make db-restore BACKUP=./backups/mongodb-20250601-120000
POST /api/auth/register
Content-Type: application/json
{
"email": "[email protected]",
"password": "securepassword"
}
POST /api/auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "securepassword"
}
Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}All link endpoints require authentication with a JWT token in the Authorization header:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
GET /api/links
GET /api/links/{id}
POST /api/links
Content-Type: application/json
{
"url": "https://example.com",
"title": "Example Website",
"description": "An example website",
"tags": ["example", "website"]
}
PUT /api/links/{id}
Content-Type: application/json
{
"url": "https://updated-example.com",
"title": "Updated Example",
"description": "An updated example website",
"tags": ["updated", "example"]
}
DELETE /api/links/{id}
GET /api/links/search?q=searchterm
This project is licensed under the MIT License - see the LICENSE file for details.