GithubHelp home page GithubHelp logo

d3vlopes / school-management Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 596 KB

API de gerenciamento escolar, utilizando TDD, Clean Architecture e design patterns com Node e Typescript.

Home Page: https://school-management-api-5ucj.onrender.com/docs

Shell 0.07% TypeScript 99.91% JavaScript 0.02%
clean-architecture design-patterns nodejs tdd typescript vitest

school-management's Introduction

Olá, seja bem vindo(a) 👋

Desenvolvedor full stack com 4 anos de experiência com desenvolvimento de software.

Determinação, liderança e busca constante por evolução, fazem parte das minhas características.

Minha maior satisfação é utilizar meus conhecimentos para criar aplicações que possam ajudar as pessoas, tornando suas vidas melhores.

Em meus projetos procuro sempre utilizar as melhores práticas e conceitos de desenvolvimento de software.

Me preocupo sempre em criar aplicações que além de bonitas sejam funcionais e com foco na experiência do usuário, com boa usabilidade e acessibilidade, para que o usuário consiga concluir seus objetivos de forma simples.

Se você busca um profissional comprometido com a qualidade, eficiente e criativo, fale comigo e vamos juntos desenvolver soluções incríveis!


school-management's People

Contributors

d3vlopes avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

school-management's Issues

[Admin] - Create AdminGetAll

Description

Create AdminGetAll use case.

Requirement funcional

  • Should get all admins

Bussines rules

  • Should not get all admins if not authenticated

Task

  • Create UseCase
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Validation] - Add Validator

Description

Add Validator.

Requirement funcional

  • Should validate if email is valid
  • Should validate if length is valid

Requirement not funcional

  • Should make validations with zod

Bussines rules

  • Length validation should receive min and max

Task

  • Add Adapter

[Admin] - Create register

Description

Create use case for register admin.

Requirement funcional

  • Should register a new admin user

Requirement not funcional

  • Should encrypt password

Bussines rules

  • Should not register if email is exists
  • Should not register is not name is provided
  • Should not register is not email is provided
  • Should not register is not password is provided

Task

  • Create UseCase
  • Add Repository implementation
  • Add Adapters implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Teacher] - Add TeacherLogin

Description

Add TeacherLogin use case.

Requirement funcional

  • Should generate access token

Requirement not funcional

  • Should compare password with bcrypt
  • Should generate access token with JsonWebToken

Bussines rules

  • Should not login if email is not provided
  • Should not login if password is not provided
  • Should not login if email or password is invalid

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Teacher] - Add TeacherRegister

Description

Add TeacherRegister use case.

Requirement functional

  • Should register a new teacher

Requirement not functional

  • Should encrypt password

Bussines rules

  • Should not register if email is invalid
  • Should not register if password length less than 6 characters
  • Should not register if name length less than 3 characters
  • Should generate auto ID for student on register
  • Should not register if email is already register

Task

  • Create Model
  • Create Schema
  • Create function for generate teacher ID
  • Create Repository
  • Create UseCase
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[AcademicTerm] - Create AcademicTermUpdate

Description

Create AcademicTermUpdate use case

Requirement funcional

  • Should update academic term

Bussines rules

  • Should receive id by params
  • Should not update if name already exists
  • Should not update if academic term not found
  • Should not update if not authenticated
  • Should not update if user is not admin

Task

  • Add update method on repository
  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Middlewares] - Add AdminRole

Description

Add AdminRoleMiddleware.

Requirement funcional

  • Should verify if user is admin

Bussines rules

  • Should not allow access if user is not admin role

Task

  • Create Middleware
  • Add middleware on get admin profile route
  • Test Route

[AcademicYear] - Add AcademicYearCreate

Description

Add AcademicYearCreate use case.

Requirement funcional

  • Should create a new academic year

Bussines rules

  • Should not create new academic year if name is less than 4 characters
  • Should not create new academic year if year not valid year
  • Should not create a new academic year if it already exists

Task

  • Create Model
  • Create Schema
  • Create UseCase
  • Create Repository
  • Create Repository implementation
  • Add number validation on validator
  • Implement number validation on adapter
  • Create Controller
  • Refactor Code
  • Create Route

[AcademicTerm] - Create AcademicTermGetById

Description

Create AcademicTermGetById use case.

Requirement funcional

  • Should get academic term by id

Bussines rules

  • Should not get academic term if not found
  • Should receive id by params
  • Should not get academic term if not authenticated
  • Should not get academic term if user is not admin

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Factories] - Add missing default case

Descrição

Adicionar default case nos factories para retornar uma erro caso não exista o case solicitado do factory.

Tasks

  • Adicionar default use case nas factories dos modules
  • Adicionar default use case nas factories dos shared

[Teacher] - Create TeacherUpdate

Description

Create TeacherUpdateProfile use case.

Requirement funcional

  • Should update teacher data

Requirement not funcional

  • Should encrypter new password with JsonWebToken

Bussines rules

  • Should not register if email is invalid
  • Should not register if email is already register
  • Should not register if name length less than 3 characters
  • Should not register if password length less than 6 characters
  • Should encrypter password if password is provided
  • Should not update if user is not authenticated
  • Should not update if user is not teacher

Task

  • Create Repository method
  • Add Repository implementation
  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Middlewares] - Create StudentRole

Description

Create StudentRoleMiddleware .

Requirement funcional

  • Should verify if user is student

Bussines rules

  • Should not allow access if user is not student role

Task

  • Create Middleware
  • Test Route

[Student] - Create StudentRegister

Description

Create StudentRegister.

Requirement funcional

  • Should register a new student

Requirement not funcional

  • Should encrypt password with Bcrypt

Bussines rules

  • Should not register if email is invalid
  • Should not register if password length less than 6 characters
  • Should not register if name length less than 3 characters
  • Should not register if email is already register
  • Should generate auto ID for student on register
  • Should not register if user if not admin
  • Should not register if user is not authenticated

Task

  • Create Model
  • Create Schema
  • Create Repository
  • Create Repository implementation
  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Middleware] - Refactor RoleMiddleware

Descrição

Juntar os middlewares adminRole, studentRole e teacherRole em apenas um middleware.

Task

  • Remover arquivos adminRole, studentRole e teacherRole
  • Criar arquivo roleMiddleware
  • Atualizar rotas para utilizar o middleware roleMiddleware

[Admin] - Refactor AdminUpdate

Descrição

Refatore adminUpdate para melhorar a qualidade do código, deixando mais simples e fácil de entender.

Tasks

  • Alterar os testes
  • Alterar adminUpdateUseCase
  • Altear adminUpdateController

[AcademicTerm] - Create AcademicTermGetAll

Description

Create AcademicTermGetAll use case.

Requirement funcional

  • Should get all academic terms

Bussines rules

  • Should not get all academic years if not authenticated
  • Should not get all academic years if user is not admin

Task

  • Create UseCase
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Mock] - Add mockFactory on controllers

Descrição

AdicionarmockFactory nos teste de controllers.

Tasks

  • Criar arquivos de mocks nos testes que não tiver
  • Adicionar mockFactory nos testes que forem necessário

[Teacher] - Create TeacherDelete

Description

Add description here.

Requirement funcional

  • Should ...

Requirement not funcional

  • Should ...

Bussines rules

  • Should not ...

Task

  • Task 1

[AcademicYear] - Create AcademicYearDelete

Description

Create AcademicYearDelete use case.

Requirement funcional

  • Should delete academic year

Bussines rules

  • Should not delete if academic year not found
  • Should receive id by params
  • Should not get academic year if not authenticated
  • Should not get academic year if user is not admin

Task

  • Add delete method on repository
  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Teacher] - Create TeacherGetProfile

Description

Create TeacherGetProfile use case.

Requirement funcional

  • Should get teacher profile info

Bussines rules

  • Should get id by access token
  • Should not get if teacher not found
  • Should not get if not authenticated
  • Should not get if user is not teacher

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Student] - Create StudentGetById

Description

Create StudentGetById.

Requirement funcional

  • Should get student by id

Bussines rules

  • Should not get if student not found
  • Should receive id by params
  • Should not get if not authenticated
  • Should not get if user is not admin

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Admin] - Create AdminGetProfile

Description

Create AdminGetProfile use case.

Requirement funcional

  • Should get admin profile info

Bussines rules

  • Should not get admin profile if admin not found

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Rote

[AcademicYear] - Create AcademicYearGetAll

Description

Create Add AcademicYearGetAll use case.

Requirement funcional

  • Should get all academic years

Bussines rules

  • Should not get all academic years if not authenticated
  • Should not get all academic years if user is not admin

Task

  • Create UseCase
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Docs] - Add API documentation

Description

Add API documentation.

Requirement functional

  • Should generate documentation

Requirement not functional

Task

  • Config Swagger
  • Config Swagger Autogen
  • Create doc for admin routes
  • Create doc for academic term routes
  • Create doc for academic year routes
  • Create doc for student routes
  • Create doc for teacher routes

[Admin] - Add validations on AdminRegister

Description

Add missing validations on AdminRegister.

Requirement funcional

  • Should validation fields

Bussines rules

  • Should not register if email is invalid
  • Should not register if password length less than 6 characters
  • Should not register if name length less than 3 characters

Task

  • Add Validation on UseCase
  • Add implementations on UseCase
  • Add Controller tests
  • Test Route

[AcademicTerm] - Add AcademicTermCreate

Description

Add AcademicTermCreate use case.

Requirement funcional

  • Should create a new academic term
  • Should associate academic term to admin on create

Bussines rules

  • Should not create a new academic term if fields name, description e duration not provided
  • Should not create a new academic term if it already exists
  • Should not create academic term if not authenticated
  • Should not create academic term if user is not admin

Task

  • Create Model
  • Create Schema
  • Create UseCase
  • Create Repository
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Admin] - Create login

Description

Create login use case.

Requirement funcional

  • Should make login
  • Should generate access token

Requirement not funcional

  • Should compare password with bcrypt
  • Should generate access token with JsonWebToken

Bussines rules

  • Should not make login if email is not provided
  • Should not make login if password is not provided
  • Should not make login if email or password is invalid

Task

  • Add Validations
  • Create UseCase
  • Create Adapters implementation
  • Create Controller
  • Refactor Code
  • Create Route

Setup

Task

  • Typescript
  • Eslint
  • Prettier
  • Vitest
  • Tsup
  • Tsx
  • Husky
  • Github Templates
  • Github Action
  • Mapper paths

[Docs] - Add README

Description

Add README.MD with project informations.

Task

  • Create about section
  • Create objetive section
  • Create learning section
  • Create tools section
  • Create demostration section
  • Create installation section

[AcademicYear] - Create AcademicYearGetById

Description

Create AcademicYearGetById use case.

Requirement funcional

  • Should get academic year by id

Bussines rules

  • Should not get academic year if academic year not found
  • Should receive id by params
  • Should not get academic year if not authenticated
  • Should not get academic year if user is not admin

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Middlewares] - Add TeacherRole

Description

Add TeacherRoleMiddleware.

Requirement funcional

  • Should verify if user is teacher

Bussines rules

  • Should not allow access if user is not teacher role

Task

  • Create Middleware
  • Test Route

[AcademicYear] - Create AcademicYearUpdate

Description

Create AcademicYearUpdate use case.

Requirement funcional

  • Should update academic year

Bussines rules

  • Should not update if name is less than 4 characters
  • Should not update if year not valid year
  • Should not update if name already exists
  • Should receive id by params
  • Should not update academic year if not authenticated
  • Should not update academic year if user is not admin

Task

  • Add update method on repository
  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[AcademicYear] - Associate academic year to admin

Description

Associate academic year to admin.

Requirement funcional

  • Should associate academic year to admin on create
  • Should dessasociate academic year to admin on delete

Task

  • Create repository implementation
  • Change UseCase
  • Change Controller
  • Add populate field academicYears on AdminProfile

[AcademicTerm] - Create AcademicTermDelete

Description

Create AcademicTermDelete use case.

Requirement funcional

  • Should delete academic term
  • Should disassociate academic term to admin on delete

Bussines rules

  • Should not delete if academic term not found
  • Should receive id by params
  • Should not delete academic term if not authenticated
  • Should not delete academic term if user is not admin

Task

  • Add delete method on repository
  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Admin] - Create AdminUpdate

Description

Create AdminUpdate use case.

Requirement funcional

  • Should update admin data

Requirement not funcional

  • Should encrypter new password

Bussines rules

  • Should not update if email is invalid
  • Should not update if email is already registered
  • Should not update if password length less than 6 characters
  • Should not update if name length less than 3 characters

Task

  • Create UseCase
  • Add Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Teacher] - Create TeacherGetAll

Description

Create TeacherGetAll use case.

Requirement funcional

  • Should get all teachers

Bussines rules

  • Should not get all teachers if not authenticated
  • Should not get all teachers if user is not admin

Task

  • Add Repository method
  • Create UseCase
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

[Student] - Create StudentLogin

Description

Create StudentLogin.

Requirement funcional

  • Should generate access token

Requirement not funcional

  • Should compare password with Bcrypt
  • Should generate access token with JsonWebToken

Bussines rules

  • Should not login if email is not provided
  • Should not login if password is not provided
  • Should not login if email or password is invalid

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Student] - Create StudentGetProfile

Descrição

Criar StudentGetProfile.

Requisitos funcionais

  • Deve pegar as informações do perfil do estudante

Regras de negócio

  • Deve pegar o id pelo token de acesso
  • Não deve pegar se o estudante não for encontrado
  • Não deve pegar se não estiver autenticado
  • Não deve pegar se o usuário não for um estudante ou um administrador

Tasks

  • Criar testes para do UseCase
  • Criar Implementação do UseCase
  • Criar teste para o Controller
  • Criar implementação para o Controller
  • Verificar se não existe oportunidade para melhor o código
  • Criar rota
  • Atualizar documentação para adicionar o novo recurso

[Teacher] - Create TeacherGetById

Description

Add description here.

Requirement funcional

  • Should get teacher by id

Bussines rules

  • Should not get if teacher not found
  • Should receive id by params
  • Should not get if not authenticated
  • Should not get if user is not admin

Task

  • Create UseCase
  • Create Controller
  • Refactor Code
  • Create Route

[Student] - Create StudentGetAll

Description

Create StudentGetAll.

Requirement funcional

  • Should get all students

Bussines rules

  • Should not get all students if not authenticated
  • Should not get all students if user is not admin

Task

  • Add Repository method
  • Create UseCase
  • Create Repository implementation
  • Create Controller
  • Refactor Code
  • Create Route

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.