tanyacapres icon indicating copy to clipboard operation
tanyacapres copied to clipboard

Ask anything about the presidential program in the 2024 election with OpenAI

[!WARNING]
The project moved to: github.com/mgilangjanuar/tanyacapres-2.0

TanyaCapres

This is a web-based application that can be used to chat with the PDF file of the presidential candidate. This application is built using ExpressJS, React, and TypeScript with OpenAI integration to generate embeddings and answer questions.

Getting Started

  1. Install NodeJS and Yarn on your machine.

  2. Clone this repository.

  3. Install dependencies.

    cd api && yarn install && cd ../web && yarn install && cd ..
    
  4. Define environment variables.

    cp api/.env.example api/.env
    
    Variable Description
    OPENAI_API_KEY OpenAI API key
    SECRET Secret for decrypting prompt
    DECRYPT_KEY Key for authentication
    cp web/.env.example web/.env.local
    
    Variable Description
    VITE_API_URL API URL
    DECRYPT_KEY Key for authentication
    OPENAI_API_KEY OpenAI API key
  5. Run in development mode.

    yarn dev