yurihnrq / next-blog-api Goto Github PK
View Code? Open in Web Editor NEWRESTful API wrote with typescript and express.
License: MIT License
RESTful API wrote with typescript and express.
License: MIT License
Implement a feature where when creating a specific user it will have admin privileges. Maybe a .env config telling the email of the user that, when created, will be admin.
Create API endpoints for all CRUD operations over blog posts.
Some features got lost after the refactor in this PR #13.
They need to be reimplemented for the app development get back in progress.
OBS: Try to use TDD in the coding of this tasks. ๐
Create users router to provided endpoints for all users CRUD operations.
tsx is a simplier, newer and better ts code runner. It`s powered by esbuild and is very fast.
Add tsx as the code runner for development and remove ts-node-dev from the project.
Tasks for the issue.
Send verification e-mail with token to user on account creation. Create and endpoint (users\:userId\verify
) to confirm verification.
A new property should be added to the User model: isVerified
.
users\:userId\verify
route and VerifyUserController.Generate a /docs route to access Swagger UI documentation of the API.
Verify which is the best pratice while sharing the same interface in differente app modules. Check answers in this question.
Code refactor for better SOLID implementation.
Verify the need of middleware to prevent sensitivy data exposure.
Use prisma middlewares: https://www.prisma.io/docs/concepts/components/prisma-client/middleware
Add proper exception handling at AuthMiddleware to return a better response when a invalid token is provided.
On token validation error, the response should be APIError(401, 'Unauthorized request.').
Current response when invalid token is provided.
Create an express middleware do validate user authentication.
Create a middleware that handle all errors thrown by controllers, services and repositories.
interface APIError {
status: number;
message: string;
}
Create unit tests for exiting factory methods.
Improve code quality by creating DTO interfaces for users module.
Use Fedora base image to create a development container for the project.
The image should be configured with
Setup up the project with requested tools.
Use zod for request schemas validation using a middleware that receive an schema and use it to validate the request body.
Tasks for the issue.
Create endpoint to fetch specific user posts. This endpoints should be /users/:id/posts
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.