Please make sure you have Node.js installed on your machine.
The first time you install the project, install the dependencies using:
npm installThen, run npm run dev:server to connect your local repository to a Convex database. When asked to, connect with your personal GitHub account. You can choose any name you want for the project.
You can then stop the server with Ctrl+C.
Note
You don’t need to run npm run dev:server during regular development. Instead, you can use npm run dev which starts both the Convex development tool and the Next.js server.
To have some sample data you can use for development, you can run the following command:
npm run seedThis script automatically creates some admin accounts. Don’t hestitate to add your own email address before running it (in convex/internal/seed.ts) so that you’re an admin too.
npm run devOpen http://localhost:3000 with your browser to see the result.
You can set up the environment variables of the deployment on the Convex dashboard (run npx convex dashboard to open it).
Set the environment variable OPENAI_API_KEY to an OpenAI API key. (You can ask Ola to generate one for you if necessary.)
This project uses the Google APIs to implement authentication.
Follow this tutorial to create a client ID.
When prompted for authorized redirect URIs, add {BASE_URL}/authRedirect, where {BASE_URL} is the address users access the website from (e.g. http://localhost:3000 for a local development instance).
Copy the resulting client ID and secret in the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET environment variables in the Convex dashboard.