Skip to content
/ prometheus Public template

django + vite + react + typescript = ๐Ÿ˜

Notifications You must be signed in to change notification settings

seplveda/prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PROMETHEUS

All layouts/workflows are created using the public Prometheus template here: https://github.com/seplveda/prometheus. Using this template enables us to build/devel/QAs quickly without having to think about all the ins and outs of making backends and frontends, because has config vite, typescript, django on Pipenv by default.

Django + Vite + React + Typescript = ๐Ÿ˜

Foundation

TBD

Install and Run

  • Clone this repo or branch.

Backend

  • cd prometheus
  • git checkout prometheus-branch-template - The branch by default is main, but you maybe check what feature are you looking first.
  • pipenv shell - This will create a new env for the project.
  • pipenv install - This will build/install the project dependencies of backend services
  • python backend/manage.py runserver - Run this for check if server it's ok
    • run migrations with python backend/manage.py makemigrations and then python backend/manage.py migrate if you are checking some features on repo, you must run makemigrations with label app if is not generated by default, use this python backend/manage.py makemigrations app_label, app_label are in apps.py of every apps.

Frontend

  • cd prometheus
  • npm install - This will build/install the project dependencies of frontend services
  • npm run dev - Run this for check if frontend server it's ok

File Structure (TBD)

  • layout_starters/src/pages - each starter's main Inky (html) file.
  • layout_starters/src/partials - reusable sections of code. For example, every page has the same social link section, so it is defined as a partial and added into each page with {{> social}}
  • layout_starters/src/assets/scss - SASS files for each starter. Each starter has its own .scss file which is included in the app.scss file.
  • layout_starters/finals - The final version of HTML and CSS that is inserted into ui_api to be used as the starter body code. These are not automatically generated files. They need to be updated manually with every change (more on this below).
  • layout_starters/dist - folder where all generated HTML is placed after each build. This is the HTML that should be copied and modified for CIO after each modification is made to the Inky files.

Production

  • Build the frontend.
    • npm run build
    • python backend/manage.py collecstatic
    • set DEBUG=False on backend/settings.py
    • remove re_path(r"^static/(?P<path>.*)$ from backend/urls.py
    • now, you are ready to GO!

About

django + vite + react + typescript = ๐Ÿ˜

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages