Skip to content

I-GUIDE/iguide-ue-backend

Repository files navigation

I-GUIDE Platform Backend

The backend middleware server for the next-gen I-GUIDE platform. The middleware serves as a bridge between React.js frontend and data layer consisting of neo4j and OpenSearch. neo4j provides consistent and reliable data storage for the system along with providing graph based data manipulation capabilities. On the other hand OpenSearch replicates searchable data from the data store and provides robust and scalable search functionalities including keyword search, llm search etc.

Getting Started

Clone the repo from GitHub:

git clone https://github.com/I-GUIDE/iguide-ue-backend.git

Install the dependencies:

If package.json is available

npm install 

Otherwise

npm i express multer cors dotenv '@opensearch-project/opensearch' node-fetch '@aws-sdk/client-s3' multer-s3 axios swagger-ui-express swagger-jsdoc neo4j-driver compromise bad-words sharp

Update configurations:

Create .env file with configuration options for OpenSearch, SSL certificates, JWT secrets, neo4j etc. (NOTE: .env.example is provided for reference)

Start the development server:

sh start.sh

The server logs will be written to server.log. If restarted, the logs are rolled over with timestamp (e.g. server-2024-09-12T20:01:19.log) with latest server logs always written to server.log.

Swagger UI for endpoints will be accessible at ${HOST}:${PORT}/api-docs as specified in the .env file.

Running server can be stopped by

sh stop.sh

How To Contribute

Naming Conventions

  • Function Names: lowerCamelCase e.g. function lowerCamelCase(){}
  • Class Names: UowerCamelCase e.g. class UpperCamelCase
  • Variable Name: lower_snake_case e.g. let snake_case = 0;
  • Constant Name: UPPERCASE e.g. const UPPERCASE = 10;

Code Structure

File Description
server_neo4j.js Main entry point to the middleware server
backend_neo4j.js All functionalities to access and work with neo4j database
backend_opensearch.js All functionalities to access and work with opensearch backend
iguide_cors.js Common CORS policy configurations used by the server components
utils.js System Enums + General utility functions
routes/users.js All /api/users* endpoint implementations
routes/elements.js All /api/elements* endpoint implementations
routes/documentation.js All /api/document* endpoint implementations
routes/private_elements.js All /api/private-elements* endpoint implementations

Creating a new endpoint

ToDo ...

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •