March - April 2019
🔨 CRUD Application to manage events online. If you want to know how does it look like check it out on Heroku
- Laravel - PHP Framework
- React - JS Framework
- Postgresql - Database
- Julien Caramazza (Backend)
- Vincent Chilot (Frontend)
- Michael Lambrechts (Frontend)
- Thibaut Janssens (Full Stack)
This project is licensed under the MIT License - see the LICENSE.md file for details
You'll need composer and npm to download and install all the dependencies.
You need a PostgreSQL database, if you already have one, you can put your credentials in the .env file in the DB_... section. If you do not have one, you can use docker. The docker-compose.yml is given in the root directory.
To get a development env running, install all the dependencies with:
composer install && npm install
Don't forget to edit your .env file. If you do not have one:
cp .env.example .env
And modify your credentials. Then generate your jwt key and your app key
php artisan key:generate
php artisan jwt:secret
If you don't have a PostgreSQL you can start the docker-compose.yml file is included up in the root directory
docker-compose up
To start your PHP server use the command (by default the server will start on localhost:8000):
php artisan serve
You can specify a port by using
php artisan serve --port=8080
Or you can simply run the launchscript.sh with:
./launchscript.sh
If it doesn't work, it probably means you have to set the right to execute it.
sudo chmod +x launchscript.sh
The project is ready to deploy on heroku, just push this repo to your herokuapp repository. Add you addon for the database with the following :
heroku addons:create heroku-postgresql:hobby-dev
Don't forget to edit the configs with:
- APP_ENV = production
- APP_KEY
- APP_URL = your url
- DB_CONNECTION = heroku
- JWT_SECRET
- MAIL_PASSWORD
- MAIL_USERNAME
And finally run in the console of your heroku app:
php artisan migrate:fresh
to set your database
Only takes a JSON as input.
{
"name":"yourName",
"email":"yourEmail",
"password":"yourPassword"
}
Return your token.
Only takes a JSON as input.
{
"email":"yourEmail",
"password":"yourPassword"
}
- id: The identifier of the event as an integer.
- name: The name of the event.
- date_event: The date of the event.
- author: The identifier of the user that created the event.
- description: A description of the event.
- reminder: A date to know when to send a notification for all the participant at the event.
- image_url: A link to the image that you want for the event.
For every route where you have to be logged in, you simply have to add to your request the following header:
{
'Content-Type': "application/json",
'Authorization': "Bearer " + "your token"
}
Returns a complete list of all the events.
(must be logged) Returns a complete list of all the events you created.
(must be logged) Returns a complete list of all the events you created.
Returns a complete list of all the events that are already finished.
Returns a complete list of all the events that are yet to come.
Returns a event by id.
(must be logged and the author of the event) Only takes JSON as input.
{
"name" : "Name of event",
"date_event" : "YYYY-MM-DD HH:MM:SS",
"description" : "Your description",
"reminder" : "YYYY-MM-DD HH:MM:SS",
"image_url": "url"
}
Updates a event.
(must be logged) Only takes JSON as input.
{
"name" : "Name of event",
"date_event" : "YYYY-MM-DD HH:MM:SS",
"description" : "Your description",
"reminder" : "YYYY-MM-DD HH:MM:SS",
"image_url": "url"
}
Creates a new event. Returns the newly created event id.
(must be logged) (Id is the id of the event) Allows the user to subscribe to an event.
(must be logged) (Id is the id of the event) Allow the user to unsubscribe to an event.