Skip to content

Krishnasaireddy-1/Marks-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marks-management

Marks Management System

This project demonstrates managing student data using API endpoints and a React-based frontend. It showcases the use of Axios for making HTTP requests and Express.js for creating a backend server.

API Endpoints

1. Retrieve Student Data

  • Endpoint: GET /data/:id
  • Description: Retrieves the student details (name and marks) for a given student ID.
  • Request Parameters:
    • id: The unique ID of the student.
  • Response:
    • Success (200):
      {
          "name": "Harsh",
          "marks": 95
      }
                          
    • Failure (404):
      {
          "error": "Data not found for the given ID"
      }
                          

2. Add or Update Student Data

  • Endpoint: POST /data/:id
  • Description: Adds a new student or updates an existing student's data.
  • Request Parameters:
    • id: The unique ID of the student.
  • Request Body:
    {
        "name": "krishna",
        "marks": 85
    }
                
  • Response:
    • Success (200):
      {
          "message": "Data added/updated successfully"
      }
                          
    • Failure (400):
      {
          "error": "Invalid input data"
      }
                          

Frontend Functionality

The frontend is built using React and allows the user to:

  • Fetch student data by entering their ID and clicking the "Fetch Data" button.
  • Add or update student data by providing their ID, name, and marks, and clicking the "Send Data" button.

Technologies Used

  • Frontend: React, Axios
  • Backend: Express.js, Node.js
  • Data Storage: JSON file

How to Run the Project

  1. Clone the repository.
  2. Install dependencies for both frontend and backend:
    cd frontend
    npm install
    

    cd ../backend npm install

  3. Start the backend server:
    node server.js
    
  4. Start the frontend development server:
    npm start
    

Project Demo

Screenshot-2025-01-27-231135.png

License

This project is open-source and can be freely used and modified.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors