Skip to content

awerks/software_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a part of the Software Engineering course

High Level Architecture Diagram

High Level Architecture Diagram

Local documentation in the documentation branch

View Local Documentation

Install railway-cli

curl -fsSL https://railway.com/install.sh | sh

Connect to this project

railway link

Install Postgres Client

For macOS

brew install libpq

For Windows

winget install postgresql

For Linux

sudo apt install postgresql-client

Connect to Postgres

psql -h <host> -u <user> -P <port> -p <database>

enter password when prompted

replace <host>, <user>, <port> and <database> with the values from the railway database variables

or with railway-cli

railway connect postgres

Set environment variables

export SPRING_DATASOURCE_URL=<connection-string>
export SPRING_DATASOURCE_USERNAME=<username>
export SPRING_DATASOURCE_PASSWORD=<password>
export SWAGGERHUB_TOKEN=<token>
export JWT_SECRET=<your-very-long-secret-key-that-is-at-least-32-characters-long>
export SPRING_MAIL_HOST=smtp.gmail.com
export SPRING_MAIL_PORT=587
export SPRING_MAIL_USERNAME=<mail_username>
export SPRING_MAIL_PASSWORD=<mail_password>

replace <connection-string>, <username>, <password> mail_username mail_password with the values from the railway backend variables for <connection-string> use SPRING_DATASOURCE_PUBLIC_URL value from the backend variables and <token> with SwaggerHub token

Run the project locally

./mvnw spring-boot:run

Push API changes to SwaggerHub

./mvnw clean verify -Papi-documentation

access the server at http://localhost:8080

Install dbdocs and login

npm install -g dbdocs && dbdocs login

Generate DBML

dbdocs db2dbml postgres <connection-string> -o database.dbml

get the connection string from the railway dashboard (DATABASE_PUBLIC_URL)

If you make changes to the database, publish the changes to dbdocs

dbdocs build database.dbml --project awerks/se_project

Make and push changes to the project

git add .
git commit -m "your message"
git push

Railway will automatically deploy the changes to the production environment.

or using railway-cli

railway up

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Java Spring Boot Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5