A Node.js application providing an API for accessing and managing student marks.
-
Admin Functions
- Secure login
- Change Admin Password
- API key generation for external use
- Viewing existing API keys
- Deleting API keys
- File upload to update student marks data (CSV format)
- Downloading a template CSV file for data updates
-
API Functions
- Authentication using generated API keys
- Fetching student marks data based on:
- Enrollment number
- Batch and roll number
- Node.js and npm (or yarn)
- MongoDB database installed and running
-
Clone the repository:
git clone https://github.com/Shreypatel65/Marks_API.git
-
Install dependencies:
cd marks-api npm install
-
Configure MongoDB connection:
- Update the MongoDB connection URL in the
utils.js
file if necessary.
- Update the MongoDB connection URL in the
-
Create data structures (if needed):
- If not already created, set up the required collections in your MongoDB database (
studinfo
,authdb
, andkeydb
).
- If not already created, set up the required collections in your MongoDB database (
-
Start the server:
node index.js
-
Admin Dashboard
Access the admin dashboard for login and other authorized functionality (the specific route will depend on your setup).
-
Marks API Endpoint
- Route:
/marks
- Method: GET
- Required Query Parameter:
key
: A valid API key (generated from the admin dashboard)
- Additional Query Parameters:
enroll
: Enrollment numberbatch
: Student batchrollno
: Student roll number
Example usage:
http://localhost:3000/marks?key=YOUR_API_KEY&enroll=12345678
- Route:
Contributing
Contributions are welcome! Please open an issue or submit a pull request.