Binsta is a Fullstack CRUD-application where users can upload and share code snippets with a Instagram-like UI
Build with selfbuild PHP MVC-framework: Twig Templates, RedBeanPHP-ORM and Tailwind CSS
-
User Authentication
- User registration and login
- User can update username, password or bio
- User can upload a profile picture
- Users can search for other users using the top search bar
-
Code snippets
- Add, edit and like code snippet posts
- Users may comment under posts
- Users may fast-copy code snippets, or:
- Users may fork snippet posts
- User can click to the user's profile via the post
- Posts are labeled through programming language tags
-
Database management
- Managed by RedBeanPHP-ORM
- Seeder available for testdata:
seeder.php
- Backend Framework: Selfbuild PHP MVC-Framework
- Template Engine: Twig
- Database ORM: RedBeanPHP
- Database: MySQL
- CSS: Tailwind CSS
- Clone this repository
- Configure your webserver (like apache), or create a virtual host to point to the
publicfolder - Install dependencies:
composer install
- Set up MySQL database:
- Create a database called 'binsta'
- Create a
.envfile by running:
cp ./.env.example ./.env- Configure database in
.env:DB_HOST="localhost" // etc...
- Seed the database:
php seeder.php
- Serve the application:
php -S localhost:8000 -t public
-
Start your web server (like apache)
-
Open the app in your browser: localhost
-
Default test user's login:
- Username:
test - Password:
test
OR:
- Username:
future-tech-leader - Password:
password
- Username:
-
While updating styling in twig templates, run this command for Tailwind CSS to dynamically update
styles.css(for development):
./tailwindcss -i ./public/resources/css/input.css -o ./public/resources/css/styles.css --watch
Feel free to create issues or pull requests