Overview:
Available at : https://bikesv2.fly.dev
Log in test account:
-
parola2
-
Artifacts:
-
- Backend sourcecode
-
- Frontend Source code & package
30.01.2024
- Our vision is to create a seamless and efficient solution for urban commuters, offering a better way to navigate through city traffic. By providing a bike reservation app, we aim to revolutionize the daily commute experience, making it convenient, eco-friendly, and enjoyable.
- We also aim to enhance bikes owners rental capabilities by crating a renting platform for business owners
- At the current time, the main target is satisfied, as we provide a platform for bikes rental with a seamless user experience and payment method.
- For future releases, user experience should be enhanced to be more appealing and partners portal should open
- Prerequisites:
- node package manager - node (https://nodejs.org/en/download)
- Java Development Kit (JDK) 17
- Maven 3
! important - don't forget:
- Create .env file for frontend - this is where your api keys will be
- Modify
application.properties
in spring boot - for the same reason
- Clone the project with
git clone https://github.com/inginerie-software-2023-2024/proiect-inginerie-software-ando-foro.git
- Go to frontend (
cd frontend
) and runnpm install
- this will install dependecies; - In frontend run
npm run start
-> your local development should start atlocalhost:4200
- Go to backend (
cd backend
) and runmvn clean install
andmvn spring-boot:run
-> your local server should start atlocalhost:8080
This application production version is released via fly.io
- Repeat steps 1. and 2. mentioned above.
- Install
flyctl
viapwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"
(for windows) or follow instructions for other systems - go to
frontend
and runflyctl launch
- this will initialize a new application. - Create express server to serve the frontend dist ( copy the
/frontend/server.js
file ) - Run
ng build
ornpm run build
to build files for production - Create docker container to publish / pull locally -- This is an extra step, just in case your working repository is not public --
6.1. Follow the
.github/workflows
folder for instructions on how to containarize this project 6.2autodeploy
- backend ;autodeploy-frontend
- frontend - Edit
fly.toml
image to push from your docker container and use the express server ( see/frontend/fly.toml
) - For a better performance the springboot application was packed using
paketo
packet manager - Repeat step 3 but for
/backend
- Create docker container for your backend ( same as frontend, step 6 )
- Repeat step 7 for backend
fly.toml
; - Remember to edit your frontend
environment
file to include the new backend deployed app asapiUrl
-
Request configurations from a team member, or a placeholder of our models and data Or
-
Set up your own: We use a mysql database, so you can host your own on amazon rds, the models will be configured automatically once the application is run for the first time; You should also create a
stripe
developer account for testing and developing purposes. -
Name and store files accordingly. For example, in frontend, a
service
that is not directly dependant on the whole application ( is modular ) should be stored inside theservices
folder. !! Recommended: When modifying the frontend, create newcomponents
/services
by usingng g component {filename}
/ng g service {filename}
. Functions are better to be named viacamelCase
, and ideally used with a brief explanation using/** explanation **/
- When contributing, provide a meaningful message, ideally with a issue number so it's easier to track. You can also create a branch with a brief description as name.
- MVC ( Model - view - Controller ) pattern with interfaces for better understanding the data types;
- Microservices - each action was decomposed to smaller actions that communicate through the api layer or third parties;
- Observer pattern
- Dependecy injection
- Beans configurations for backend
- Repository pattern to access data
- Data sources: Mysql database hosted on amazon cloud rds instance + Stripe portal + firebase auth
- Data inputs: At every reservation a
reservation
object is stored and updated if there was a cancel or refund - Configuration files:
environment.ts
for frontend where configurations of firebase auth and publicstripe key
areapplication.properties
for backend where database andfirebase admin
configs are stored. This can be removed when using fly by setting enviornments viaflyctl
at deployment time
Tests are made in frontend using karma
and jasmine
to test initialization of components and functionality of services, for example the authentication service used inside the admin
page, where if the mocked token does not contain the custom claim of admin
, the user will be redirected to the /profile
page.
Firebase Stripe AWS SENDGRID
Bootstrap OWL-Carousel Karma Jasmine Admin SDK