Giter Club home page Giter Club logo

brainstation-capstone-frontend's Introduction

Capstone Gist Application Documentation

Table of Contents

  1. Introduction
  2. Features
  3. Tools and Dependencies
  4. Getting Started
  5. Development Scripts
  6. Deployment

Introduction

Capstone Gist is a React-based web application that integrates various AI models to provide users with summarized information on any given topic. Users can interact with different AI models, save responses, and manage their data through an intuitive UI. The application uses Firebase for authentication and Firestore for database management.

Features

Home Component

The Home component is the central hub of the application. It integrates user authentication, library management, and AI interactions.

Functionalities:

  • User Authentication: Uses Firebase to manage user sessions and access control.
  • Library Management: Fetches and displays user-specific library items from Firestore.
  • AI Interaction: Allows users to input topics and select different AI models to generate responses.

Library Sidebar

The Library component provides a sidebar for navigating and managing saved responses.

Functionalities:

  • Collapsible Design: Users can expand or collapse the sidebar for better screen utilization.
  • Interactive List: Displays saved responses with options to edit, delete, or view details.

Edit Functionality

The editing feature is managed through EditForm, UpdateResponse, and UpdateEditForm components.

Functionalities:

  • In-Place Editing: Allows users to edit topics and individual points within their saved responses.
  • Dynamic Updates: Changes are immediately reflected in the UI and saved to Firestore.

Authentication

Authentication is managed using Firebase OAuth and context API.

Functionalities:

  • Multiple Auth Methods: Supports email/password and Google logins.
  • Context Management: Uses React Context to provide authentication state across the application.

Server Integration

The server handles AI interactions and is built with Node.js and Express.

Functionalities:

  • AI Model Integration: Communicates with OpenAI, Google Generative AI, and Perplexity AI to generate content.
  • Error Handling: Provides robust error handling to manage API failures gracefully.

Tools and Dependencies

The application uses several key tools and dependencies:

  • React: For building the user interface.
  • Firebase: For authentication and Firestore database.
  • Express: For server-side operations.
  • Axios: For making HTTP requests.
  • Sass: For styling components.
  • OpenAI, Google Generative AI, Perplexity AI: For AI content generation.
  • UUID: For generating unique identifiers.
  • Vite: For development and build processes.

Getting Started

To get started with the application, follow these steps:

  1. Clone the repository:

    git clone <repository-url>
    cd capstone-gist
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the root directory and add the following:

    PORT=3000
    GPT_KEY=your-openai-api-key
    GEMINI_KEY=your-google-generative-ai-key
    PERPLEXITY_KEY=your-perplexity-ai-key
    
  4. Start the development server:

    cd frontend
    npm run dev
  5. Start the API server:

    cd backend
    npm start

Development Scripts

  • npm run dev: Starts the development server using Vite.
  • npm run build: Builds the application for production.
  • npm run lint: Runs ESLint to check for code quality issues.
  • npm run preview: Previews the production build locally.

Deployment

To deploy the application, follow the build and deployment process suitable for your hosting environment. Ensure that the environment variables are correctly set in your production environment.

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.