Skip to content

Pastein is online text hosting and text sharing build on top of django

License

Notifications You must be signed in to change notification settings

gingantic/pastein

Repository files navigation

Pastein

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.

🌟 Features

  • 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???

🌐 Live Demo

✅ Requirements

  • Python 3.9 or higher
  • PostgreSQL or MySQL database
  • S3-compatible storage for media files
  • Redis for caching

🚀 Installation

Follow these steps to set up the Pastein project locally:

  1. Clone the repository:

    git clone https://github.com/gingantic/pastein.git
    cd pastein
  2. Create a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # Linux/macOS
    venv\Scripts\activate     # Windows
  3. Install the required dependencies:

    pip install -r requirements.txt
    pip install -r requirements-debug.txt # optional: for debugging in local
  4. Set up environment variables:
    Create a .env file using the example provided in .env.dummy:

    nano .env
  5. Apply migrations:

    python manage.py makemigrations
    python manage.py migrate
  6. Collect static files:

    python manage.py collectstatic
  7. Run the development server:

    python manage.py runserver

Alternatively, deploy it on Vercel:

Deploy to Vercel

Note:
To make the hit/view counter work, visit or using cron to api/update-views/ with a header containing:
Authorization: Bearer <cron-secret-key>

📖 Usage

  1. Visit the website in your web browser.
  2. You can register an account or log in or just leave it.
  3. Create, view, edit, and delete pastes.
  4. You can manage your profile and upload a profile picture.

📋 TODO List

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.

🤝 Contributing

Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

📬 Contact

If you have any questions, feedback, or suggestions, feel free to contact me on GitHub.

Thank you for using Pastein!

About

Pastein is online text hosting and text sharing build on top of django

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published