Skip to content

An efficient cloud-based system capable of providing support and assistance that lets you build native apps using a cross-platform UI toolkit.

License

Notifications You must be signed in to change notification settings

Aerothon-NTP/boilerplate-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boilerplate-gen

App: Site Build Build


  • 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.

Dev :

  • 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.

Tools :

javascript react nodejs python docker git


Features :

  • 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.



Requirements for using different frameworks and tools :

1. Docker

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
    

2. FastAPI

Python 3 FastAPI

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.

API endpoints:

  • 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

3. Flask

Python 3 FastAPI

You can use any frontend framework with this. This project uses SQLite in this project. Other databases can also be used easily.

API endpoints:

  • 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>

4. Springboot

java springboot

You can use any frontend framework with this. This project uses SQL in this project. Other databases can also be used easily.

API endpoints:

  • 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

5. ReactJS

Integeration

Works with any boilerplate backend chose, uses all the end-points given in the doc (check backend schema).

Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

npm test

Launches the test runner in the interactive watch mode.

npm run build

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.

6. AngularJS

Integeration

Works with any boilerplate backend chosen, uses all the end-points given in the doc (check backend schema).

Scripts

To Install dependencies in the development mode. In the project directory, you can run:

npm install

Serve on localhost:4200

ng serve

Build for production

ng build

7. Command Line Tool

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

pip install -r requirements.txt

Requirements file

STEP 2: You can run the Tool using

python tool.py

8. Testing

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.

About

An efficient cloud-based system capable of providing support and assistance that lets you build native apps using a cross-platform UI toolkit.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published