Git Product home page Git Product logo

codebin's Introduction

Codebin

Codebin is a lightweight alternative to Pastebin Pastebin built on top of the Laravel PHP Framework. Feel free to use this as a reference, inspiration, or a base for your new project.

Laravel Laravel


About Codebin

Codebin is a privacy focused text sharing application which I designed and developed within a very small timeframe for my academic display on a programming course in Information and Communications Technology. I do not recommend using this in production unless you are skilled enough with Laravel to perform your own tests. The purpose for this repository is simply a Proof of Concept.

  • Cleanly written Controllers, Models, and Helpers following the official standards defined in Laravel documentation
  • hCAPTHCA protection against robots based on scyllaly/hCaptcha
  • Automatic paste deletion, if expiry is set
  • Password protected pastes
  • Option to view syntax highlighted snippet, or simply just a raw plain text version
  • Responsive user interface for all devices

Demo


Installation

Purchase a VPS for developing and deploying applications in staging and/or production. You may install it locally as well for development and testing purposes, steps below.

  1. Run composer install to install Laravel and its dependencies
  2. Run npm i to install Tailwind and Vite
  3. Edit the .env file and fill in your MySQL host and its credentials
  4. Run the database migrations with php artisan migrate
  5. Launch Laravel in development mode with php artisan serve and Vite with npm run dev

Remarks

  • Sign up and create an API key for hCaptcha and place them accordingly in your .env file
  • In order for the expired paste deletion to work properly, set an automatic task with command php artisan app:process-expired-pastes once a minute (eg. Crontab for Linux and Task Scheduler for Windows operating systems)

Contributing

Contributors are welcome. Please follow the existing naming, and syntax policy for your pull request to be accepted.


Plans for Future

  • Finish the optional user account system to allow users edit their own pastes when authenticated
  • Add light theme
  • Improve overall user experience
  • Add a server-side encryption for contents of password protected pastes
  • Implement a rate-limiting algorithm to prevent mass scraping (this can be achieved with eg. Cloudflare for now)
  • Purchase a domain and setup a live demo in production

codebin's People

Contributors

mtfy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.