April 2019
🔨 The job was to take the application of another group and while fixing some minor bugs, adding new features. Obviously we had to keep the design of the original owner. You can check the original application on this link. The application is still a CRUD Application to manage events online. If you want to know how the forked new version looks like check it out here 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 installDon't forget to edit your .env file. If you do not have one:
cp .env.example .envAnd modify your credentials. Then generate your jwt key and your app key
php artisan key:generate
php artisan jwt:secretIf you don't have a PostgreSQL you can start the docker-compose.yml file is included up in the root directory
docker-compose upTo start your PHP server use the command (by default the server will start on localhost:8000):
php artisan serveYou can specify a port by using
php artisan serve --port=8080Or you can simply run the launchscript.sh with:
./launchscript.shIf it doesn't work, it probably means you have to set the right to execute it.
sudo chmod +x launchscript.shThe 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-devDon'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:freshto set your database.
There is a scheduler for email notification when someone is wanting to attend to an event. To activate it do not forget to also use :
heroku ps:scale web=1
php artisan schedule:daemon
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.
- street: The street where the event is taking place.
- postal_code: The postal codle where the event is taking place.
- city: The city where the event is taking place.
- price: The price to participate to the event.
- country: The country where the event is taking place. (Can be null)
- 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.
- media_type: Can be one of the two following: video or image.
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",
"street":"Street somewhere over the rainbow",
"postal_code":"5532",
"city":"City",
"price":"2",
"country":"Heaven",
"description" : "Your description",
"reminder" : "YYYY-MM-DD HH:MM:SS",
"image_url": "url",
"media_type": "video"
}Updates a event.
(must be logged) Only takes JSON as input.
{
"name" : "Name of event",
"date_event" : "YYYY-MM-DD HH:MM:SS",
"street":"Street somewhere over the rainbow",
"postal_code":"5532",
"city":"City",
"price":"2",
"country":"Heaven",
"description" : "Your description",
"reminder" : "YYYY-MM-DD HH:MM:SS",
"image_url": "url",
"media_type": "video"
}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.
(must be logged) Only takes json as input:
{
"eventId": "1",
"eventName": "Graspop",
"senderId": "5",
"senderName": "Vincent",
"emailList": ["email1","email2"]
}