Installation & Setup - Etown-CS310/Story-Forge GitHub Wiki
This guide will help you get StoryForge running on your local machine.
Make sure you have the following installed:
You will also need accounts for:
Optional but recommended:
- A code editor such as VS Code
Open your terminal and clone the project:
git clone https://github.com/<your-username>/<repo-name>.gitNavigate into the project folder:
cd StoryForgeInstall all required packages with npm:
npm installThis will install all frontend and backend dependencies necessary for development.
Initialize your Convex backend:
npx convex devThis will:
- Create a new Convex deployment (if this is your first time)
- Generate your
CONVEX_DEPLOYMENTID - Provide your
VITE_CONVEX_URL - Sync your database schema
Keep this terminal running - it watches for changes to your Convex functions.
In a new terminal window, copy the example environment file:
cp .env.local.example .env.localOpen .env.local in your code editor and fill in your actual values:
-
CONVEX_DEPLOYMENT: Copy from the
npx convex devoutput above -
VITE_CONVEX_URL: Copy from the
npx convex devoutput above - VITE_WORKOS_CLIENT_ID: Get from your WorkOS Dashboard
-
VITE_WORKOS_REDIRECT_URI: Use
http://localhost:5173/callbackfor local development
StoryForge’s AI Assistant requires access to OpenAI’s API. Get your API key from the OpenAI Dashboard.
Store it securely in Convex’s environment storage by running:
npx convex env set OPENAI_API_KEY sk-your-openai-key-hereVerify it’s set:
npx convex env listYou should see:
OPENAI_API_KEY=sk-************************Your key is stored securely on Convex’s backend — it will not be exposed in .env.local or client code.
In the same terminal (or a new one), start the local development server:
npm run devBy default, the app should be accessible at http://localhost:5173 in your browser.
-
Convex errors: Make sure
npx convex devis still running in a separate terminal -
Authentication issues: Verify your WorkOS credentials are correct in
.env.local - Port conflicts: If port 5173 is in use, Vite will automatically try the next available port