AntonyZ89 / django-nuxt-poc

Nuxt and Django POC - An ideal combo for an amazing experience in building a fullstack application!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django + Nuxt POC

Django + Nuxt POC Login Screen Discipline Form Screen Discipline Screen User Form Screen User Screen

Getting Started

Backend

  1. Create your environment with venv
  2. Enter in the environment and activate it with
$ source ./bin/activate
  1. Clone the repository
$ git clone https://github.com/AntonyZ89/django-nuxt-poc
  1. Install requirements
$ cd backend
$ pip install -r requirements.txt
  1. Run server
$ python manage.py runserver

Frontend

  1. Install dependencies
$ cd frontend
$ bun install
  1. Copy .env.local.example
$ cp .env.local.example .env.local
  1. Run server
$ bun run dev

Tables

DISCIPLINE

Field Description
id
user_id teacher's id
name
workload

USER

Field Description
name
email (Can be the same if the "user type" is different)
password
birthday (Must be of legal age)
created_at
updated_at
role TEACHER, STUDENT, COORDINATOR

DISCIPLINE_STUDENT

Field Description
discipline_id
user_id student's id

ROLES

Role Permissions
TEACHER List disciplines, Add notes, View notes
COORDINATOR CRUD discipline, CRUD user, Add professor, Add students
STUDENT List disciplines, View notes

FRONTEND

  • Login
  • CRUD disciplines
  • CRUD users
  • Libraries:
    • Shadcn Vue for components
    • Tailwind
    • TypeScript
    • Nuxt (framework)
    • Pinia (state management)
    • Vee-validate (form validation)
      • Zod (validation management)
    • Nuxt-i18n
      • English
      • Spanish
      • Portuguese
  1. Upon login, the user selects their role: Teacher, Coordinator, or Student, and is then redirected to the corresponding frontend.
  2. Items on the screen are hidden based on the user's role.
  3. If attempting to access a route without logging in, the user will be redirected to the login screen.
  4. If attempting to access a route without permission, the user will be redirected to the home screen.

BACKEND

  • All CRUD operations using GenericViewSet/ModelViewSet
    • CRUD disciplines
    • CRUD users
    • CRUD discipline-students
  • Models
    • User
      • Subtypes (proxy)
        • Student
        • Teacher
        • Coordinator
    • Discipline
    • DisciplineStudent
    • Serializers
      • Login
      • Discipline
      • DisciplineStudent
      • Entity
        • User
        • Student
        • Teacher
        • Coordinator
    • Response
      • NotFound
      • Token
  • Unit tests
    • Models and serializers
    • Using fixtures
  • Token Auth
  • Documentation (automatic)
    • Swagger
    • Redoc

About

Nuxt and Django POC - An ideal combo for an amazing experience in building a fullstack application!


Languages

Language:Vue 48.4%Language:Python 38.4%Language:TypeScript 10.9%Language:JavaScript 1.3%Language:CSS 0.9%