DEV Community

Sahil khatiwada
Sahil khatiwada

Posted on • Edited on

1

🎯 Day 3/100: Database Models and API Endpoints

Today, I focused on defining the database models and creating essential API endpoints for my Task Management Application backend. This step is crucial in establishing the app's core functionality.

Here’s What I Accomplished:

1️⃣ User Model:
Designed a schema to handle user-related data, including fields like name, email, and password.
Added timestamps to track user creation and updates.

Image description

2️⃣ Task Model:
Defined a schema with fields for title, description, due date, priority, Status and a reference to the associated user.
Included priority levels (Low, Medium, High) to enhance task categorization.

Image description

3️⃣ API Endpoints:
Created endpoints to handle CRUD operations for users and tasks register only .
Ensured proper validation and error handling to maintain data integrity.
Enabled relational data handling by populating user references in task queries.

Next Steps:
Implement user authentication using JWT to secure the API.
Build advanced features like task filtering, sorting, and pagination.

This progress marks an important milestone in the journey of building a fully functional backend. I’m learning a lot and excited to tackle the challenges ahead 🚀.

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up