GithubHelp home page GithubHelp logo

karin478 / tyres_app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15.05 MB

A web page for tyre engineers track and manage tyre usage

Dockerfile 0.01% HTML 1.23% JavaScript 1.23% CSS 0.75% Python 96.69% PowerShell 0.05% Shell 0.03%

tyres_app's Introduction

Tyres_App

Demo

Introduction

What is this project about?

Develop a web app for tyre engineers to manage and track tyre sets for car races. Engineers input the number of tyre sets per type (Soft, Medium, Hard) available for each weekend. They also define the race weekend's sessions (e.g., Free Practice, Qualifying, Race) and specify the number of sets to return after each session except the Race. The app should allow saving these settings for recurring race formats.

The main feature includes planning the tyre usage per session, deciding which sets to return, and visualizing remaining sets for the Race. The app tracks each set's state, indicating whether they are new or used. This tool aims to optimize tyre management during race weekends.

TyreTrack harnesses React for its user-friendly interface and Django for robust backend operations, streamlined within Docker containers for optimal deployment. The system's architecture is centered around RESTful APIs, ensuring efficient, scalable communication between front-end and back-end components. A relational database underpins the application, managing complex data with high efficiency. Additionally, API functionalities and integration are rigorously tested using Postman, guaranteeing reliable and seamless performance. This technical synergy provides a powerful, yet user-centric platform for managing race tyre logistics and strategy.

This project is designed to manage the states and data related to different sets of tyres. Additionally, it provides functionalities to manage weekend formats and sessions. The application consists of a frontend and a backend, both of which are containerized using Docker.

Deployment Instructions

Using Docker Compose

  1. Clone the repository to your local machine.
  2. Navigate (cd) to the directory containing the docker-compose.yaml file.
  3. Run docker-compose up.
  4. Access the frontend at http://localhost:3000/.

For backend-specific tests, you can use port 8000: http://localhost:8000/.

API Endpoints for Testing

  1. Tyre Sets

  2. Weekend Format

  3. Weekend Session

  4. Weekend Templates

  5. Data Management

Environment Variable Configuration

To configure environment variables for different deployment environments:

Docker Compose: Define variables in the docker-compose.yml file under the environment section for each service. frontend: environment: - REACT_APP_BACKEND_URL=http://your-backend-service

Local Development: For local development, create a .env file in the frontend project and define the variables.

Project Advantages

Easy Deployment with Docker Compose

The use of Docker Compose simplifies the deployment process. It enables you to set up both the frontend and backend by running a single command, making the setup effortless.

Enhanced Security with Dual Validation

Both the frontend and backend validate input data, providing an extra layer of security.

  1. The backend has safeguards to restrict the number of tyres that can be returned.
  2. The frontend performs additional calculations on numerical inputs to ensure the correct number of tyres is used in each race session.

Relational Database

The application uses a relational database and object-oriented programming (OOP) for better data management.

  1. Data is stored as object properties, which are interconnected through foreign keys and many-to-many relationships, providing clear logic and better data integrity.

RESTful API

The connection between the frontend and backend adheres to RESTful API standards, offering better compatibility and stability.

Simple and Direct Operational Logic

The application is designed to be user-friendly. It has a straightforward interface and workflow, making it easy to understand and use.

Scalability

  1. Comprehensive Data Model: The data model includes entities like 'car' and 'race weekend,' allowing for future extensions, such as multi-team management and multiple weekend management.
  2. Technology Stack: The application uses a React+Django stack, which can handle most production environments and offers excellent scalability, both in terms of size and features.

Potential Issues and Future Directions

Data Relationship Optimization

  1. Due to the time constraints of rapid development, some models are not fully utilized. With more time, the relationships between models, especially many-to-many relationships, should be optimized for better data integrity.

Authentication and User Management

  1. Although the backend API adheres to RESTful API standards, token-based authentication should be added if time allows.
  2. A login system is required for team and multi-user management. This will likely involve adding a new data model for 'User' and more extensively utilizing the 'Car' model to manage multiple vehicles.

Error Handling

  1. Limited time has not allowed for comprehensive error handling mechanisms, such as try-catch, to be implemented in both the frontend and backend.

Testing

  1. More comprehensive testing, including unit tests focused on model and view behaviors, and integration tests involving various API requests and static file loading, should be conducted.
  2. Load testing should also be considered if the software is to be used by multiple teams.

Deployment

  1. While Docker Compose is currently used for local deployment, cloud-based deployment should be considered for broader access across different devices like smartphones and iPads.

Code Quality

  1. The code was mostly written to meet quick development needs, resulting in redundancy and sub-optimal readability.
  2. The current code has not undergone performance auditing in terms of time and space complexity. A thorough review should be conducted if it is to be used in production.

Template Feature

  1. The template feature is not fully developed yet. Although the backend APIs related to templates are mostly done, the frontend lacks a stable 'Apply Template' function.

UI/UX Enhancements

  1. The interface is functional but not optimized for user interaction.
  2. Device-specific UI improvements are needed, especially for mobile devices. One idea is to use a stack-based interface for each tyre ID, allowing detailed configurations in a sub-page.

Backup System

  1. The current database is SQLite, which may not be adequate for production needs. A robust backup strategy or migration to a cloud-based database service may be necessary.

tyres_app's People

Contributors

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