A minimalist bookmark management system that allows users to organize, store, and access their favorite web links. Users can authenticate via magic links, manage their bookmarks, and organize their web resources efficiently.
- Magic Link Authentication: Secure, passwordless authentication via email
- Bookmark Management: Create, read, update, and delete bookmarks
- User Sessions: Secure session management with automatic expiration
- Public/Private Bookmarks: Control bookmark visibility
- Click Tracking: Track bookmark usage statistics
- Responsive Design: Clean, mobile-friendly interface
- SQLite Database: Lightweight, file-based database storage
- Python 3.11: Modern Python runtime
- FastAPI: High-performance, modern web framework
- SQLAlchemy: Powerful SQL toolkit and ORM
- SQLite: Lightweight database engine
- Uvicorn: Lightning-fast ASGI server
- Pydantic: Data validation using Python type hints
- Jinja2: Template engine for dynamic HTML
- Alpine.js: Minimal JavaScript framework
- Tailwind CSS: Utility-first CSS framework
- Docker: Containerized deployment
- Docker Compose: Multi-container orchestration
- Traefik: Reverse proxy and load balancer
- GitHub Actions: CI/CD workflows
- Watchtower: Automated container updates
webStash/
├── main.py # FastAPI application entry point
├── database.py # Database configuration and initialization
├── models.py # SQLAlchemy database models
├── schemas.py # Pydantic data validation schemas
├── services/ # Business logic layer
│ ├── auth.py # Authentication service
│ └── bookmark.py # Bookmark management service
├── templates/ # Jinja2 HTML templates
├── static/ # CSS, JS, and image assets
├── requirements.txt # Python dependencies
├── dockerfile.dev # Development Docker configuration
├── dockerfile.prod # Production Docker configuration
├── docker-compose.dev.yml # Development compose file
├── docker-compose.prod.yml # Production compose file
└── Makefile # Development commands
- Docker and Docker Compose
- Node.js and npm (for frontend development)
-
Clone the repository
git clone <repository-url> cd webStash
-
Install frontend dependencies
npm install
-
Build and run with Docker
make dev
-
Access the application
- Open http://localhost:8080 in your browser
Install dependencies:
npm install
Watch and compile Tailwind CSS:
npx tailwindcss -i ./static/css/input.css -o ./static/css/output.css --watch
Run development server with auto-reload:
make test
Or run directly with uvicorn:
uvicorn main:app --host 0.0.0.0 --port 8080 --reload
POST /api/login
- Request magic link authenticationGET /verify
- Verify magic link token
POST /api/v1/bookmarks/create
- Create new bookmarkPUT /api/v1/bookmarks/update
- Update existing bookmarkDELETE /api/v1/bookmarks/delete
- Delete bookmarkPOST /api/v1/bookmarks/read
- Get bookmark details
GET /
- Home pageGET /view/bookmarks
- Bookmark dashboardGET /policies
- Privacy/Terms pagesGET /404
- Not found page
id
: Primary keyemail
: User email (unique)premium
: Premium status flagcreated_at
,updated_at
: Timestamps
id
: Primary keyuser_id
: Foreign key to usersurl
: Bookmark URLtitle
: Bookmark titledescription
: Optional descriptionpublic
: Visibility flagclick_count
: Usage countercreated_at
,updated_at
: Timestamps
id
: Primary keyuser_id
: Foreign key to userstoken
: Session token (unique)expires_at
: Expiration timestampcreated_at
: Creation timestamp
id
: Primary keyemail
: Target emailtoken
: Magic link token (unique)expires_at
: Expiration timestampused
: Usage flagcreated_at
: Creation timestamp
make dev
make prod
# Development
docker build -f dockerfile.dev -t webstash-dev .
docker run --rm -p 8080:8080 webstash-dev
# Production
docker build -f dockerfile.prod -t webstash-prod .
docker run --rm -p 8080:8080 webstash-prod
export DATABASE_URL=sqlite:///./webstash.sqlite3
export [email protected]
export HOST_DOMAIN=example.com
- Traefik: Reverse proxy and SSL termination
- GitHub Actions: Automated CI/CD pipeline
- Watchtower: Automatic container updates
- Docker Compose: Service orchestration
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
- Icons: Heroicons
- FastAPI Documentation: fastapi.tiangolo.com
- SQLAlchemy Documentation: sqlalchemy.org