Coder Social home page Coder Social logo

demyst_task's Introduction

demyst_task

Business Loan Application System

Welcome to the Business Loan Application System! This repository contains the source code for a simple business loan application system with a frontend and a backend. The system interacts with third-party providers for decision-making and balance sheet data.

Project Structure

The project is organized into the following directories:

backend/
|-- app/ Contains the main backend application code.
|   |-- __init__.py
|   |-- controllers/  Contains controllers that handle HTTP routes.
|   |   |-- __init__.py
|   |   |-- balance_sheet_controller.py
|   |   |-- application_controller.py
|   |-- models/ Contains data models for the application.
|   |   |-- __init__.py
|   |   |-- balance_sheet.py
|   |   |-- application.py
|   |-- services/ Contains business logic services.
|   |   |-- __init__.py
|   |   |-- decision_engine_service.py
|   |   |-- accounting_service.py
|-- config.py
|-- main.py for the backend application.
|-- tests Contains unit tests for the backend application.
- frontend/
|-- src/
|   |-- components/
|   |   |-- ApplicationForm.js
|   |-- App.js
|   |-- index.js
|   |-- index.css
|-- public/
|   |-- index.html

Workflow

The task had been implemented with understanding of clean code practices and MVC Architecture

  1. Setup: Create a virtual environment and install dependencies from requirements.txt.

  2. Backend: The backend is built using Flask. Run the backend server using python main.py. The server will be available at http://localhost:5000.

  3. Frontend: The frontend (React) should be developed separately. Ensure the frontend is configured to proxy requests to the backend at http://localhost:5000.

  4. Unit Tests: Unit tests are written using Python's built-in unittest framework. The tests cover controllers and services. Run tests using python -m unittest discover tests.

Unit Tests

Unit tests have been written to ensure the correctness of various components in the application. The tests are located in the tests directory. They cover the functionality of controllers and services, ensuring that the business logic and endpoints work as expected.

Getting Started

  1. Clone this repository:

  2. Create Virtual environment in Python

    python -m venv venv

    source venv/bin/activate # On Windows: venv\Scripts\activate

  3. Install Dependencies

    pip install -r requirements.txt

  4. Run Backend Server

    python main.py

  5. Configure and run the frontend separately, ensuring that requests are proxied to http://localhost:5000.

  6. Run unit tests:

    python -m unittest discover tests

  7. To Run Frontend Navigate to frontend folder and install dependencies Assuming NodeJS is installed and Add to path in system

    npm install

  8. Run frontend

    npm start

Configure Docker

Navigate to clone repository and Compose Up the docker image

Run:

docker-compose up

Note

If you are running the Flask and React server separately add Proxy of Flask server in React app

If you are using Docker then add http:<service_name>:5000 as proxy in React app

demyst_task's People

Contributors

patel-rupin2000 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.