- Secure File Sharing: Upload files and share them via access keys.
- Text Sharing (Clipboard): Save and retrieve text snippets effortlessly.
- Access Controls: Set expiration dates and maximum download limits on shared content.
- User Authentication: Register and log in securely via JWT.
- Role-based Access: Native support for Pro/Admin users for extended limits and capabilities.
- Auto-Cleanup: Content automatically expires and becomes inaccessible based on defined limits.
- Framework: Vue 3 (Composition API)
- Build Tool: Vite
- Routing: Vue Router
- HTTP Client: Axios
- Framework: Flask, Flask-RESTful
- Database: SQLAlchemy (SQLite for Development, PostgreSQL for Production)
- Authentication: Flask-JWT-Extended, Flask-Bcrypt
- Other Tools: Flask-Migrate, Flask-Limiter, Flask-Cors, Waitress, Celery, Redis.
clipboard/
├── backend/ # Flask REST API backend
│ ├── app/ # Application factory, models, resources, and utils
│ ├── instance/ # Local database storage
│ ├── uploads/ # Directory for uploaded files
│ ├── run.py # Entry point for the backend
│ ├── requirements.txt# Python dependencies
│ └── .env # Environment configuration
│
├── frontend/ # Vue 3 Vite application
│ ├── src/ # Components, views, router, and assets
│ ├── public/ # Static assets
│ ├── package.json # Node dependencies and scripts
│ └── vite.config.js # Vite integration configuration
│
└── README.md # Project documentation
- Node.js (v18+)
- Python (3.9+)
- (Optional) Redis server running if using Celery backgrounds tasks.
-
Navigate to the backend directory:
cd backend -
Create and activate a virtual environment:
- Windows:
python -m venv venv venv\Scripts\activate
- Mac/Linux:
python3 -m venv venv source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Environment Variables: Create a
.envfile in thebackenddirectory based on the.envtemplate provided:# Development DB (SQLite) DEV_DATABASE_URI=sqlite # Production DB (PostgreSQL) PROD_DATABASE_URI=postgresql # Flask environment FLASK_ENV=development,production # Allowed CORS Origin
-
Initialize Database: Ensure
FLASK_ENVis set to development. By default, running the server automatically triggers the database creation. If using Flask-Migrate, run:flask db upgrade
-
Run the Backend Server:
python run.py
The backend will typically run on
http://127.0.0.1:5000(Waitress or Flask Dev Server based on environment).
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run the Development Server:
npm run dev
The frontend will be available at
http://localhost:5173. By default, it accesses the backend running locally.
POST /api/auth/register- Create a new userPOST /api/auth/login- Authenticate users and receive a JWTPOST /api/FileUpload- Upload a file securelyGET /api/FileDownload- Download an uploaded file securely using access keyPOST /api/clipboard/save- Save text to clipboard securelyGET /api/clipboard/retrieve- Retrieve text from clipboard safely
- Backend: Serve using a reliable WSGI server like Waitress (Windows) or Gunicorn (Linux). For robust production instances, bind it behind reverse proxies (Nginx/Apache). Configure properly
PROD_DATABASE_URIfor production databases like PostgreSQL. - Frontend: Build the Vue 3 app using
npm run buildto get the production bundled outputdist/, which is then served statically via Vercel, Netlify, or Nginx. UpdateCORS_ORIGINSin backend configuration as needed for your deployed domains.
