Skip to content
/ CRUD Public

A basic JavaScript CRUD app developed during the final phase of the CS-Internship web development

Notifications You must be signed in to change notification settings

enavid/CRUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ CRUD API with JavaScript – Final Step of CS-Internship Web Track

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


πŸ“Œ About This Project

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 db structure (model.js)

πŸ’‘ What is CRUD?

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.


πŸ“‚ Project Structure

.
β”œβ”€β”€ 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

πŸ”‘ API Endpoints

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.


πŸš€ How to Run

# 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


🧠 What I Learned

  • 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

πŸ“£ Credits

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

About

A basic JavaScript CRUD app developed during the final phase of the CS-Internship web development

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published