An open API service indexing awesome lists of open source software.

https://github.com/varshithsoma/results-backend

This backend processes Excel sheets, extracts student data, and stores it in a MongoDB database. It also provides a set of RESTful APIs that allow the frontend to fetch and display result.
https://github.com/varshithsoma/results-backend

expressjs jwt-authentication mvc-architecture nodejs onrender-deploy xlsx

Last synced: 5 months ago
JSON representation

This backend processes Excel sheets, extracts student data, and stores it in a MongoDB database. It also provides a set of RESTful APIs that allow the frontend to fetch and display result.

Awesome Lists containing this project

README

          

# SNIST Results - Backend

## Overview
This is the backend for the SNIST Results project. It processes Excel sheets, extracts student data, and stores it in a MongoDB database. The backend also provides REST APIs for the frontend to fetch and display results.

## Tech Stack
- **Node.js** - Backend runtime environment
- **Express.js** - Web framework for building APIs
- **MongoDB** - Database for storing student results
- **Mongoose** - ODM for MongoDB
- **xlsx (npm package)** - To process Excel sheets
- **Cors & dotenv** - To handle cross-origin requests and environment variables

## Features
- Upload and process Excel sheets (.xlsx) containing student results.
- Store processed student data in a MongoDB database.
- Provide RESTful APIs to retrieve student results.
- Handle errors and invalid input gracefully.

## Installation

1. Clone the repository:
```bash
https://github.com/VarshithSoma/Results-Backend
cd Results-Backend
```

2. Install dependencies:
```bash
npm install
```

3. Set up the environment variables:
- Create a `.env` file in the root directory.
- Add the following:
```
PORT=8000
DATABASE_LOCAL=mongodb://127.0.0.1:27017/results
DATABASE_BUILD=your_production_mongodb_uri
DATABASE_PASSWORD=your_database_password
JWT_COOKIE_EXPIRES_IN=90
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=90d
```

4. Start the server:
```bash
npm start
```
## Folder Structure
```
/snist-results-backend
│-- /Controllers # API controllers for handling business logic
│-- /Models # Mongoose models for database schema
│-- /data # Data-related files (if any)
│-- /dev # Development-related configurations or scripts
│-- /routes # API route handlers
│-- /utils # Utility functions
│-- .gitignore # Git ignore file
│-- app.js # Main application file
│-- package.json # Project dependencies and scripts
│-- package-lock.json # Dependency lock file
│-- server.js # Entry point of the application
```