Pastein is a modern, feature-rich clone of Pastebin created for practice and learning purposes. It allows users to store, share, and manage text snippets online effortlessly. Built with Django, a high-level Python web framework.
- User Authentication: Login, registration, and logout functionality.
- Paste Management: Create, view, edit, expired, and delete pastes.
- Visibility Options: Set paste visibility to public, unlisted, or private.
- Secure Pastes: Option to password-protect your pastes.
- Profile Management: Update your profile and upload a profile picture.
- CAPTCHA Protection: Integrated Cloudflare Turnstile to prevent spam.
- Dark Mode: User-friendly dark mode support for enhanced usability.
- Responsive Design: Fully responsive design built with Bootstrap.
- Embedded Features: Embedded your text to your website.
- Fast and Secure???
- Python 3.9 or higher
- PostgreSQL or MySQL database
- S3-compatible storage for media files
- Redis for caching
Follow these steps to set up the Pastein project locally:
-
Clone the repository:
git clone https://github.com/gingantic/pastein.git cd pastein -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows
-
Install the required dependencies:
pip install -r requirements.txt pip install -r requirements-debug.txt # optional: for debugging in local -
Set up environment variables:
Create a.envfile using the example provided in.env.dummy:nano .env
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Collect static files:
python manage.py collectstatic
-
Run the development server:
python manage.py runserver
Alternatively, deploy it on Vercel:
Note:
To make the hit/view counter work, visit or using cron toapi/update-views/with a header containing:
Authorization: Bearer <cron-secret-key>
- Visit the website in your web browser.
- You can register an account or log in or just leave it.
- Create, view, edit, and delete pastes.
- You can manage your profile and upload a profile picture.
Here are some planned features and improvements for Pastein:
- Improve the UI/UX.
- Admin Panels.
- Optimize database queries for better performance.
- Create an API for external integration (e.g., third-party apps).
- Syntax Highlighting.
Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions, feedback, or suggestions, feel free to contact me on GitHub.
Thank you for using Pastein!