Local Setup
This guide walks you through setting up SparkFeed on your local machine from scratch.
-
Clone the repository
git clone https://github.com/Sparkable-dev/SparkFeed.git sparkfeedcd sparkfeed -
Install dependencies
SparkFeed uses Bun as its package manager and runtime. Install it first if you haven’t:
curl -fsSL https://bun.sh/install | bashThen install project dependencies:
bun install -
Set up environment variables
Copy the example environment file:
cp .env.example .env.localAt minimum, set
BETTER_AUTH_SECRET, a long random string used to sign sessions:openssl rand -base64 32 # paste the output as BETTER_AUTH_SECRET# .env.localBETTER_AUTH_SECRET=your-generated-secret-hereThe database defaults to
file:rss.dblocally, so noDATABASE_URLis needed for development. See Environment Variables for the full reference. -
Initialize the database
Push the Drizzle schema to your local SQLite database:
bun run db:pushThis creates
rss.dbin the project root with all required tables. -
Start the dev server
bun run devOpen http://localhost:3000. You’ll be prompted to create an account on first visit.
Project structure
Section titled “Project structure”sparkfeed/ ← the app (TanStack Start)├── src/│ ├── components/ ← UI components│ ├── config/ ← JSON configs (AI models, demo feeds)│ ├── db/ ← Drizzle schema + client│ ├── hooks/ ← React hooks│ ├── lib/ ← Auth client, email, demo constants│ ├── routes/ ← TanStack Router file-based routes│ └── server/ ← Server functions (RSS, AI, email actions)├── drizzle/ ← Migration SQL files├── drizzle.config.ts├── rss.db ← Local dev database (gitignored)├── .env.local ← Your local secrets (gitignored)└── package.jsonOptional: enable AI and email
Section titled “Optional: enable AI and email”SparkFeed works without AI or email keys. Those features are simply inactive. Add keys when you’re ready:
# .env.local: add any of these to unlock featuresOPENAI_API_KEY=sk-... # enables Spark AIRESEND_API_KEY=re_... # enables email verification + password resetSee AI Providers and Environment Variables for the full setup.
Next step
Section titled “Next step”Ready to start the app? Go to Run the Project →