- This repo houses the assests used to built the web application boilerplate-gen for Aerothon 4.0 organized by Airbus at Hackerearth.
- This web application enables the user to build natives apps using a cross platform UI toolkit .
- The backend for this appliaction is hosted with heroku and the frontend is hosted with github pages.
- SQLite database has been used.
- CI/CD pipeline is used to automate the software delivery process.
- It builds code, runs tests (CI), and safely deploys a new version of the application (CD) .
- It removes manual errors, provide standardized feedback loops to developers, and enable fast product iterations.
- This web application allows the user to download varoius integrated combination of frontend and backend template of a todo application supports CRUD(Create,Read,Update,Delete) operations and user can create any native application on the top of that.
- It supports the following frameworks (as of now ):
- Frontend : React, Angular and React - Native
- Backend : Flask, FastAPI, SpringBoot and NodeJS
- Requirement and dependencies for each framework is very well documented.
- This allows user to create 12 templates (more coming soon).
- It supports command line utility so the the user can directly download templates from terminal.
- All the components are dockerised ( also including dockercompose).
- We have created test templates for testing backends frameworks.
- This application provides a easy to use graphical User Interface so that anyone can use it and download the ZIP file for templates.
Change docker-compose.yml as required by your tech stack
For example React x Flask, make the following changes in docker-compose.yml:
- {fronted} -> React
- {backend} -> Flask
Run:
-
Start the app
docker-compose up
-
For starting the app with a rebuild
docker-compose up --build
-
Start the app in detached mode
docker-compose up -d
-
Stoping the app
docker-compose down
You can use any frontend framework with this. This project uses SQLite in this project. Other databases can also be used easily. Refer to this for more information on how to use other databases with FastAPI.
- Get all the todo items present in the database, send a get request on the following endpoint:
http://127.0.0.1:5000/todos
- To post a todo item in the database, send a post request on the following endpoint:
http://127.0.0.1:5000/todos
- To update a specific todo item as completed/pending, send a put request on the following endpoint:
http://127.0.0.1:5000/todos/<todoItemID>
- To delete a specific todo item, send a delete request on the following endpoint:
http://127.0.0.1:5000/todos/<todoItemID>
For further details, you can refer to http://127.0.0.1:5000/docs after starting the server. It will give you an auto generated and very detailed documentation.
- To check the working or to run the basic template, run the command in terminal:
uvicorn main:app --reload
You can use any frontend framework with this. This project uses SQLite in this project. Other databases can also be used easily.
- Get all the todo items present in the database, send a get request on the following endpoint:
http://127.0.0.1:5000/todos
- To post a todo item in the database, send a post request on the following endpoint:
http://127.0.0.1:5000/todos
- To update a specific todo item as completed/pending, send a put request on the following endpoint:
http://127.0.0.1:5000/todos/<todoItemID>
- To delete a specific todo item, send a delete request on the following endpoint:
http://127.0.0.1:5000/todos/<todoItemID>
You can use any frontend framework with this. This project uses SQL in this project. Other databases can also be used easily.
- Get all the todo items present in the database, send a get request on the following endpoint:
http://127.0.0.1:5000/todos
- To post a todo item in the database, send a post request on the following endpoint:
http://127.0.0.1:5000/todos
- To update a specific todo item as completed/pending, send a put request on the following endpoint:
http://127.0.0.1:5000/todos/<todoItemID>
- To delete a specific todo item, send a delete request on the following endpoint:
http://127.0.0.1:5000/todos/<todoItemID>
- To delete all todo items, send a delete request on the following endpoint:
http://127.0.0.1:8000/todos
For further details, you can refer to Spring-Boot. Also, as a prerequisite, you'll need to have maven 3.x and SQL pre-installed on you system. And as an SQL action, create a DB and change Application.properties file accordingly.
- To install all the packages/dependencies, run the command in terminal:
mvn install
- To check the working or to run the basic template, run the command in terminal:
mvn spring-boot:run
Works with any boilerplate backend chose, uses all the end-points given in the doc (check backend schema).
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Launches the test runner in the interactive watch mode.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Works with any boilerplate backend chosen, uses all the end-points given in the doc (check backend schema).
To Install dependencies in the development mode. In the project directory, you can run:
Serve on localhost:4200
Build for production
How to use the NTP Command line tool (Make sure you have python installed in your machine):
STEP 1: Download all the supporting packages using the following command
STEP 2: You can run the Tool using
Tests are end to end, python automatically starts the server and makes requests to the backend for testsing
Run: pytest tests/test_{backend}.py -s
Also for custom tests for your project, please alter the templates.py accordingly and those tests will be run.