/pennapps-starter

A starter webapp using React, Next.js, and Convex. Created for PennApps.

Primary LanguageTypeScript

Convex PennApps starter project

This is a starter web application that uses Convex to store persistent data.

Convex is a combined database and backend that provides live updates so your website doesn’t have to poll API endpoints and your users don’t have to refresh the page. Convex requires writing short query and mutation functions in JavaScript or TypeScript (analogous to SQL queries) then pushing these to the Convex server. These functions can then be invoked by a web application.

How to use

First fork this example on GitHub and clone it locally with git. If using git isn't your speed, download the zip file provided by GitHub; although it will be easiest to deploy your app later if you have a GitHub repository for it.

Once you have this code locally, make sure node is installed and install the dependencies of this project in a terminal from the root directory of this repo.

npm install

After you create a Convex account at https://dashboard.convex.dev, run the following command in a terminal in the root directory of this repository.

npx convex login

Now you can initialize a new Convex project,

npx convex init

and push the Convex functions for this project.

npx convex push

All that's left to do is to run your code locally with a Convex backend with

npm run dev

Deploy this app

You can deploy this app lots of places, but a great place to run it is on Vercel.

Push your app to GitHub, create an account with Vercel, and connect this app in GitHub. This gives you deploys on every push to GitHub and every merge of a PR!