{"id":16804290,"url":"https://github.com/pedro-psb/django-vite-react-ts","last_synced_at":"2025-03-17T07:19:25.085Z","repository":{"id":124086499,"uuid":"607800651","full_name":"pedro-psb/django-vite-react-ts","owner":"pedro-psb","description":"This is a template to use React inside Django, in SSR time, using Vite and Typescript.","archived":false,"fork":false,"pushed_at":"2023-03-07T14:54:00.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T16:34:54.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedro-psb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-28T17:47:42.000Z","updated_at":"2024-05-30T22:25:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"95a634cd-9eaf-45f0-b500-99ab4bac3936","html_url":"https://github.com/pedro-psb/django-vite-react-ts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-psb%2Fdjango-vite-react-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-psb%2Fdjango-vite-react-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-psb%2Fdjango-vite-react-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-psb%2Fdjango-vite-react-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedro-psb","download_url":"https://codeload.github.com/pedro-psb/django-vite-react-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989713,"owners_count":20379648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T09:44:40.253Z","updated_at":"2025-03-17T07:19:25.054Z","avatar_url":"https://github.com/pedro-psb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-vite-react-ts\n\nThis is a template to use React inside Django, in SSR time, using Vite and Typescript.\n\nThe template basically contains:\n\n- Vite's `react-ts` template\n- Django plugin [django-vite](https://github.com/MrBin99/django-vite)\n- A django-tag to inject a react HMR script in development mode.\n\nThe goal is to have a smooth development environment to build apps with react and django.\n\n## Usage\n\n```bash\n# backend\npython3 -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -r requirement.txt\n\n# frontend\nnpm install\n\n# development (need both servers running simultaneously)\npython3 manage.py runserver\nnpm run dev\n\n# production\nnpm run build\nTODO django part\n```\n\n## Wishlist\n\n- [x] Minimum working example\n- [x] Scaffold sample Multi Page Application\n- [x] Context Data: use a TS function to provide django context data in SSR time.\n- [x] Static tag/settings: use a TS functions to correctly load assets, links, etc IN DEV\n- [ ] Add a new branch setting up Mantine UI library\n- [ ] Static tag/settings: fix util to work in prod\n- [ ] Test in production\n- [ ] Add CI pipeline with pre-commit, gh action, etc\n\n### minor\n\n- [ ] Transform `add-react.html` partial into django-tag\n\n## Resources\n\n- [This gist](https://gist.github.com/lucianoratamero/7fc9737d24229ea9219f0987272896a2) helped me understand better how the integration should work. There is also a video link there.\n- Reading [django-vite](https://github.com/MrBin99/django-vite) documenetation and the project example helped in the configuration a lot.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedro-psb%2Fdjango-vite-react-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedro-psb%2Fdjango-vite-react-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedro-psb%2Fdjango-vite-react-ts/lists"}