![Logo](images/logo.png)
Imageboard API built on top of Laravel Lumen.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
To get a local copy up and running follow these simple steps.
Follow Lumen Guide and install whatever appropriate for your system.
- Clone the repo
git clone https://github.com/ravensiris/chan.git
- Setup your environment Follow guide HERE.
- Setup your database Follow guide HERE
Remember to create a database with the same name as in DB_DATABASE
variable in your .env
file.
Example in postgres:
createdb chan
Where chan
is value of your DB_DATABASE
.
You can also connect to the database using:
psql -d chan
Might be useful if you need to tweak stuff like encoding or limits.
- Run migrations
php artisan migrate:fresh
php -S localhost:8000 -t public
You need to have phpunit
installed on your system.
Follow guide HERE if you don't have it already.
phpunit
You can also run the project using docker-compose
.
# Run seeds and migrations
docker-compose --env-file docker.env run backend php artisan migrate:fresh --seed
# Run in background
docker-compose --env-file docker.env up -d
You should now be able to enter /boards
You can set the environmental variables inside the docker.env
file or inside docker-compose.yml
- Create a new app
- Push the container
heroku container:push --recursive -a NAME_OF_YOUR_APP
- Release the container
heroku container:release web -a NAME_OF_YOUR_APP
- Setup your database
Go into your app's dashboard then Configure Add-ons
, add Heroku Postgres
.
- Setup environmental variables
Go into Settings
, press on Reveal Config Vars
and then set:
APP_DEBUG=0
APP_ENV=production
APP_NAME=Chan
APP_TIMEZONE=UTC
APP_URL=YOUR_URL_HERE
CACHE_DRIVER=database # doesn't work yet, setting up redis in plans
LOG_CHANNEL=stderr # doesn't work yet
QUEUE_CONNECTION=sync
DATABASE_URL
should be set automatically by Heroku. It'll be used to connect to the database. Don't modify it!
- Ensure your web dyno is up
In
Overview
make sureweb
dyno has statusON
. - Run migrations and seed the database
heroku run --type=web -a YOUR_APP_HERE php artisan migrate:fresh --seed
- Boards
- List
- View
- Threads
- List
- View
- Create
- Replies
- Create
- List
- View
- Attachments
- Attach image to reply
- Limits
- Limit maximum threads
- Limit maximum frequency for creating new threads
- Limit replies per thread
- Limit maximum replies
- Limit max image size
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPLv3 License. See LICENSE
for more information.
Project Link: https://github.com/ravensiris/chan