GithubHelp home page GithubHelp logo

parlano's Introduction

Chat with your PDFs!

Originally inspired by the SaaS tutorial by Josh tried coding on YT: https://www.youtube.com/watch?v=ucX2zXAZ1I0

Prerequisites

This project uses the following services:

Architecture

This project is a monorepo (using Turborepo) that contains the following:

  • A Nextjs fullstack app
  • Two Cloudflare Workers
    • A worker that handles and authenticates requests to OpenAI. Called by the frontend. Communicates with OpenAI, Unkey, Clerk, and the backend.
    • A worker that integrates Clerk and Unkey. Called by Clerk webhooks on user creation and update.

Installation

  1. Clone the repo
  2. Set up Clerk
  3. Set up Unkey
  4. Set up Stripe, create a product and a price, and set up a webhook for the product
  5. Set up Cloudflare and Wrangler CLI
  6. Set up OpenAI
  7. Generate a secret key for your backend
  8. Set up the required environment variables in .dev.vars.example for each worker using npx wrangler secret put <VARIABLE>
  9. Deploy the workers using npx wrangler deploy
  10. Set up the required environment variables in .env.example for the Nextjs project
  11. Create a webhook in Clerk that calls the post-signup-worker worker
  12. Deploy the project and set all the environment variables in Vercel

Changelog

  • Implemente API rate limiting w/ Unkey
  • Switched to Turborepo for cloudflare worker
  • Switched to Clerk
  • Improved prompt
  • Fixed serverless function timeout by routing openai requests through cloudflare worker
  • Fixed mobile uploads
  • Implemented file deletion
  • Fixed uploadthing urls
  • Tabbed chat layout on mobile
  • Dark Mode
  • Fixed Pinecone
  • Migrated to React Query 5

To do

  • Propagate stripe renewal to Unkey & Clerk
  • Optimize code and env var sharing within monorepo
  • Handle Uploadthing timeouts gracefully
  • Fix a layout issue in chat view
  • Remove Pinecone dependency

parlano's People

Contributors

stabildev avatar

Stargazers

Bruno Gomes 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.