Skip to content

Seminario-Integrador-2024/GestionTUP

Repository files navigation

๐Ÿ’ป Sistema de Gestion TUP ๐Ÿš€ ๐Ÿ“š

GitHub followers License FrontCI Pipeline

Django Python React TypeScript Vite Docker Docker Compose ESLint Prettier Google Cloud

Run on Google Cloud

Table of Contents

About the project

Team project for the Seminario Universitario course at the UTN - FRRe. The project consists of a web application for managing the TUP (Tecnicatura Universitaria en Programacion) of the students of the UTN - FRRe. The project is divided into two parts, the frontend and the backend. The frontend is developed using React/TS/Vite and the backend using Python with Django/DRF.

Team

Documentation

Frontend Documentation (React)

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
    project: ["./tsconfig.json", "./tsconfig.node.json"],
    tsconfigRootDir: __dirname,
  },
};
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

=======================================

Backend

This section is used for setting up the backend Django server, using Python and Django REST framework, along with 3th party libraries like drf-spectacular for API documentation.

This deployment is done using the Dockerfile. This template provides a minimal setup to get Python working in a Django web server.

Setting up the backend for Development

  • Tools needed:
    • Shell (bash, zsh, PowerShell, etc.)
    • Python 3.10 or higher
      • pip (Python package manager)
    • Docker
      • Docker Compose
    • Visual Studio Code (optional - recommended)

Steps to set up the backend environment:

  1. Install Python 3.10 or higher using the package manager from you OS:

    1. if macOS run using zsh:

      brew install python
    2. if Ubuntu/Debian run using bash:

      sudo apt-get install python3
    3. if Windows run using PowerShell or PowerShell Core:

      winget install python

      Note: If you are using a different OS, or prefer a manual installation, please refer to the official Python download page

  2. Install pip (Python package manager):

    python -m ensurepip

    to get the latest version of pip:

    python -m pip install --upgrade pip
  3. At the root of the project, create a virtual environment:

    python -m venv venv
  4. And finally, activate the virtual environment:

    1. On macOS/Linux:

      source venv/bin/activate
    2. On Windows:

      .\venv\Scripts\Activate

    Note:

  • You can deactivate the virtual environment using the deactivate command, once you are done working on the project.
  • A complete list of python dependencies can be found in the requirements.txt file at the root of the project.
  1. Now you can install the project dependencies using pip:

    pip install -r requirements.txt

Running the Backend Server Locally

  1. Install Docker using the official downloader Docker Desktop, or using the package manager from your OS: 1.On macOS run:

     brew install docker

    2.On Linux/Debian run:

     sudo apt-get install docker

    1.On Windows run:

     winget install docker

    Note: You may also need to install Docker Compose using brew install docker-compose in macOS or sudo apt-get install docker-compose in Ubuntu/Debian

  2. Run the following command to deploy the backend server using docker-compose:

    docker-compose up -d
  3. You can access the API documentation with Swagger UI at http://localhost:8000/api/swagger-ui/ or

  4. You can access the API documentation with ReDoc at http://localhost:8000/api/redoc-ui/

  5. to stop the server and remove the volumes run:

    docker-compose down -v
  6. to stop the server and keep the volumes run:

    docker-compose down