This project serves as the back-end to the Community BBQ mobile application.
- Server framework: Spring Boot
- Database: PostgreSQL
- Linux Ubuntu. Fully updated
- Java 19. Guide to install is here https://docs.aws.amazon.com/corretto/latest/corretto-19-ug/generic-linux-install.html
- Maven 3.6 or above (try
sudo apt-get install maven) - PostgreSQL 12. Guide to install is here https://www.postgresql.org/download/linux/debian/
PostgreSQL should have version 12.
To create the database for the server follow these steps.
- On your Ubuntu machine, use
psqlto connect to your PostgreSQL server. The bash lines to do that is generally below:
$ sudo -i -u postgres
$ psql --host=<DB instance endpoint> --port=<port> --username=<master username> --password --dbname=<database name>
where <DB instance endpoint>, <port>, <master username>, and <database name> is specified for one's own PostgreSQL servers.
-
Run the
db_creation.sqlfile in the[root]/cbbq/src/main/resources/db_filesto create the tables for the database. Note: this will drop all previous tables. -
(Optional) Run the
db_add_test_data.sqlfile in the same folder as above to populate the tables with test data.
To install all dependecies of the project and run the server, enter the following bash line:
$ cd ../[install_folder]
$ sudo mvn clean spring-boot:run
The server will start at port 80.
Remember to set up the security group to open for HTTP and/or HTTPS at port 80 as well as a port for SSH connection to the developers' machine(s).
The project also contain a Postman set of test cases in the [root]/cbbq/src/test/java/com/example/cbbq/postman_tests.
There are some important TODOs to this project:
- Add authetications for both patrons and organizers
- Connect with the front-end of the project