Prerequisites
-
Ensure you are using Node v22.12.0
-
Install pnpm
Use nvm (Node Version Manager) to easily install and manage the required Node.js version as defined in the .nvmrc
file.
Setting Up JioSaavn
Prerequisites
- Ensure you are using Bun.
Step 1: Clone the Project
Run the following command to clone the repository and navigate into the project directory:
git clone https://www.github.com/shahil-yadav/saavn && cd saavn
Step 2: Install Dependencies
Install the necessary dependencies using:
Step 3: Run the server
Once the server starts, you should see output similar to this:
$ bun run --hot src/server.ts
Started development server: http://localhost:3000
Setup Turborepo (NextJS + Reddit)
Step 1: Clone the Project
git clone https://www.github.com/shahil-yadav/napsterify && cd napsterify
Step 2: Install Dependencies
Run the following commands:
nvm install && nvm use
pnpm install
Step 3 [Optional]: Install Turbo CLI Globally
Step 4: Run Development Servers
Start the development servers using:
OR
Step 5: Set Up Environment Secrets
Generate a secure authentication secret:
Then, configure the .env file in apps/www:
AUTH_DEBUG=true
AUTH_SECRET=<openssl rand -hex 32>
AUTH_REDDIT_ID=<your_reddit_id>
AUTH_REDDIT_SECRET=<your_reddit_secret>
Confused about this AUTH_REDDIT_ID and AUTH_REDDIT_SECRET, wait see this while creating your own oauth application
on Reddit
Step 6: Set the Gemini API Key or you can use Ollama locally
In the .dev.vars file under the AI worker apps/fns/ai directory, add:
# OPTIONAL IF YOU ARE USING OLLAMA
API_TOKEN=<gemini_token>
OR
const ai = new AI({ comment, provider: "ollama" })
// Ollama is configured to use `deepseek-r1:14b` model,
// however you can change it, if you want in the src/classes/ai.ts file
const results = await ai.generate()
Cloudflare loads environment variables from the .dev.vars file.
Step 7: Set the YouTube API Key
In the .dev.vars file under the YouTube worker apps/fns/yt directory, add:
Step 8: Start the Development Server
Run the dev server using:
OR
Additional Turbo CLI Features
Instead of running all development servers at once, you can selectively start specific services:
turbo run dev --filter=@shahilyadav/www --filter=@shahilyadav/reddit
For more details, check out the Turbo CLI documentation.