Archively is a simple yet powerful web application designed to help users archive, manage, and categorize their favorite links effortlessly. Built with Flask and PostgreSQL, Archively offers a seamless user experience with a clean and responsive interface powered by the Bootswatch Vapor Bootstrap theme.
- Create: Add new links with optional tags.
- Read: View and Search a list of all archived links with their associated tags.
- Update: Modify existing links and their tags.
- Delete: Remove links from the archive.
- Backend:
- Flask – A lightweight WSGI web application framework.
- Flask-SQLAlchemy – SQLAlchemy integration for Flask.
- Flask-Migrate – Manage SQLAlchemy database migrations for Flask applications.
- PostgreSQL – A powerful open-source object-relational database system.
- Psycopg2 – PostgreSQL adapter for Python.
- Frontend:
- Bootstrap 5 – Frontend component library for responsive design.
- Others:
- python-dotenv – Load environment variables from
.env
file. - ngrok – (Optional) Secure tunnels to localhost for sharing your local app online.
- python-dotenv – Load environment variables from
Before you begin, ensure you have met the following requirements:
- Operating System: macOS
- Python: Python 3.9 or higher. Download Python
- Homebrew: Package manager for macOS. Install Homebrew
- PostgreSQL: Installed and running locally (via Homebrew or otherwise).
- Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Set up the database
flask db init
flask db migrate -m "initial migration"
flask db upgrade
- Run the application
flask run
- Install Docker and Docker Compose
- Build the Docker containers
docker compose build
- Run the services
docker compose up -d
3.Run database migrations
docker compose exec web flask db init
docker compose exec web flask db migrate -m "initial migration"
docker compose exec web flask db upgrade
- View logs (optional)
docker compose logs -f
- Stop services
docker compose down
- Create new migration:
flask db migrate -m "description"
- Apply migrations:
flask db upgrade
- Rollback migration:
flask db downgrade
- Show migration history:
flask db history
- Show current migration:
flask db current
- Rebuild specific service:
docker compose build web
- Restart services: docker
compose restart
- View running containers:
docker compose ps
- Access container shell:
docker compose exec web bash
- View service logs:
docker compose logs web
- Stop services:
docker compose down