Welcome to the final project of the CS-Internship Web Development Track, proudly built during my graduation phase from this program!
π CS-Internship GitHub: github.com/cs-internship
π° CS-Internship Introduction (Persian): virgool.io article
πΊ Coding Session on YouTube: Watch CRUD Code Walkthrough
This is a simple, yet complete CRUD (Create, Read, Update, Delete) API written entirely in JavaScript using Node.js and Express.js.
π§ In this project:
- Users can sign up, log in, and receive tokens
- Each user manages a task list through standard CRUD operations
- Data is stored in a mock in-memory
dbstructure (model.js)
CRUD stands for:
- π’ Create β Add new data
- π΅ Read β Fetch existing data
- π Update β Modify existing data
- π΄ Delete β Remove data
These four operations are the backbone of nearly every application you use today.
.
βββ controller.js # Logic for handling CRUD and authentication
βββ model.js # In-memory mock database
βββ router.js # Route definitions for API endpoints
βββ server.js # Express server configuration
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/api/signup |
Register new user |
| POST | /v1/api/login |
Login with username/password |
| GET | /v1/api/ |
Fetch user's task data |
| POST | /v1/api/ |
Add new task |
| PUT | /v1/api/ |
Update task by ID |
| DELETE | /v1/api/ |
Delete task by ID |
π All routes (except signup/login) require a valid token inside the request body to identify the user.
# Clone the repo
git clone https://github.com/enavid/CRUD.git
# Move into the directory
cd CRUD
# Install dependencies
npm install express
# Start the server
node server.jsπ Server runs on: http://localhost:3000/v1/api
- Modular structure of Express apps
- RESTful API design
- Authentication with token (no external libraries)
- Data handling with mock databases
- Error handling and user-specific responses
This project was built as part of the CS-Internship Web Track, a professional internship program designed to help aspiring developers build real-world projects and gain deep industry knowledge.
π CS-Internship GitHub
π° CS-Internship on Virgool (Farsi)
πΊ YouTube Recording of This Code