Make it possible for anyone to run a simple AI app that can do document Q&A 100% locally without having to swipe a credit card 💳. Based on AI Starter Kit.
Have questions? Join AI Stack devs and find me in #local-ai-stack channel.
- 🦙 Inference: Ollama
- 💻 VectorDB: Supabase pgvector
- 🧠 LLM Orchestration: Langchain.js
- 🖼️ App logic: Next.js
1. Fork and Clone repo
Fork the repo to your Github account, then run the following command to clone the repo:
git clone firstname.lastname@example.org:[YOUR_GITHUB_ACCOUNT_NAME]/local-ai-stack.git
2. Install dependencies
cd local-ai-stack npm install
3. Install Ollama
Instructions are here
4. Run Supabase locally
- Install Supabase CLI
brew install supabase/tap/supabase
- Start Supabase
Make sure you are under
/local-ai-stack directory and run:
5. Fill in secrets
cp .env.local.example .env.local
SUPABASE_PRIVATE_KEY by running
anon key and save it as
6. Generate embeddings
This script takes in all files from /blogs, generate embeddings using transformers.js, and store embeddings as well as metadata in Supabase.
7. Run app locally
Now you are ready to test out the app locally! To do this, simply run
npm run dev under the project root and visit
6. Deploy the app
If you want to the the local-only app to the next level, feel free to follow instructions on AI Starter Kit for using Clerk, Pinecone/Supabase, OpenAI, Replicate and other cloud-based vendors.
What is Copy-On-Write
Copy-On-Write (COW) is a strategy used in computer programming and operating systems to optimize the performance and efficiency of memory...
Mobile App Development Best Practices – 11.12
Large photos in SwiftUI, Mutation Testing, Processing Payments in Firebase and more!
SDKs for which Apple will require a signature have been published
Apple has already listed SDKs commonly used in apps in the App Store that, from spring 2024, you will be...
Discover the Journaling Suggestions API
Journaling Suggestions is a visual picker interface for iPhone applications. It displays personal events that are happening in a person’s...
Tusky – An Android client for the microblogging server Mastodon
Tusky is a beautiful Android client for Mastodon. Mastodon is an ActivityPub federated social network. That means no single entity controls...
Swift 30 Projects: 30 mini Swift Apps for self-study
This repo is updated with Swift 5 and compatible with iPhone X: Simple UIKit components UIScrollView, UITableView, UICollectionView CAAnimations and...