Giter Club home page Giter Club logo

lil-ai-diary's Introduction

Personal AI Diary

Personal AI Diary Screenshot

The Personal AI Diary is a coding project I implemented incorporating journal-type user input and AI. The system facilitates users to log their thoughts, which then generates a related AI response powered by OpenAI's GPT-3 model. Currently, the application doesn't store any user data, ensuring absolute privacy.

In essence, it's a programming sandbox for introspection, where users input their thoughts and receive insightful machine-generated responses that can provide new perspectives. A key point to note is that on refresh, entries are not retained.

For the future iterations of this project, I aim to include a feature to store user sessions and diary entries in a database, giving users a seamless and more interactive experience. As it already uses Stytch's login and authentication process, hopefully this won't be too much trouble beyond setting up a db (or at the very least storing in a user's local browser storage).

This project was initialized using the Stytch + Next.js demo project, derived from create-next-app.

Check out a live version of this site here.

For user authentication, I've used the SDK with React component from Stytch integrating the OAuth logins auth flow.

Running locally

Setting up Stytch

You'll need your Project's project_id, secret, and public_token. You can find these in the API keys tab.

You will also need an OpenAI API key to make calls to OpenAI. Make sure you add that in as well.

Once you've gathered these values, add them to a new .env.local file.

cp .env.template .env.local

Next we'll configure the appropriate redirect URLs for your project, you'll set these magic link URLs for your project in the Redirect URLs section of your Dashboard. Add http://localhost:3000/authenticate as both a login and sign-up redirect URL.

Running the example app

Install dependencies by running

npm install

You can then run a development server using:

npm run dev

Open http://localhost:3000 with your browser to see the result.

Note: By default this example app enables Google for OAuth. If you haven't set up Google OAuth in your Dashboard, you'll receive a redirect error when you attempt to login via those providers.

Documentation

Learn more about some of Stytch's products used in this example app:

lil-ai-diary's People

Contributors

cszhu avatar

Stargazers

 avatar

Watchers

 avatar  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.