GithubHelp home page GithubHelp logo

synapse-backend's Introduction

Synapse Backend

Welcome to the backend repository of Synapse, a personalized AI tutor designed to provide high-quality educational support to students. This document outlines how to set up, run, and contribute to the backend of Synapse.

Table of Contents

Overview

The Synapse Backend serves as the core engine that powers the AI tutoring capabilities of the Synapse application. It handles user session and file management, communication with the Google Gemini API, and other essential backend services.

Tech Stack

  • Node.js: Runtime environment for executing JavaScript on the server.
  • Express.js: Web framework for building the API.
  • Socket.IO: Real-time communication between the frontend and backend.
  • Google Gemini API: Used to power the AI-based tutoring services.
  • Cloudinary: For storing files on another server.

Installation

Prerequisites

Ensure you have the following installed on your machine:

  • Node.js (v14.x or higher)
  • npm (v6.x or higher)
  • Firebase CLI (for Firebase services)

Steps

  1. Clone the repository:

    git clone https://github.com/riteshgharat/synapse-backend.git
    cd synapse-backend
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env file in the root directory and add the necessary environment variables. Refer to the Configuration section for details.

Configuration

The backend relies on several environment variables for configuration. Below is a sample .env file:

# FRONTEND URL
FRONTEND_URL=http://localhost:5173

# GEMINI API KEY
GEMINI_API_KEY=your-gemini-api-key

# CLOUDINARY API CONFIG
CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name
CLOUDINARY_API_KEY=your-cloudinary-api-key
CLOUDINARY_API_SECRET=your-cloudinary-api-secret

Running the Application

Development

To run the application in development mode:

npm run dev

The server will start on the port specified in your .env file, typically http://localhost:3000.

Production

To run the application in production mode:

npm run start

Deployment

To deploy the backend, follow these general steps:

  1. Set up a production environment (e.g., on AWS, Heroku, etc.).
  2. Configure environment variables according to your deployment setup.
  3. Deploy the codebase using your preferred CI/CD pipeline.

Detailed deployment instructions will vary depending on your chosen platform.

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (feature/your-feature).
  3. Commit your changes.
  4. Push to the branch.
  5. Open a Pull Request.

Ensure your code follows our coding standards and is properly tested.

synapse-backend's People

Contributors

riteshgharat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.