Record, track, and visualise your Leetcode progress with a single click.
- Clone the repository with
git clone https://github.com/P0u4a/leetcode-tracker-web.git
- Run
pnpm install
to install dependencies - Create a
.env.local
file in the project root
On Turso create a new database, note down the connection url of your new DB. Make sure you also have the Turso CLI installed. Then run turso auth token
to get your auth token for connecting to the DB. Copy your TURSO_AUTH_TOKEN
and TURSO_CONNECTION_URL
values into your .env.local
file.
Run pnpm run db:generate
to generate your SQL files from the drizzle schema. Then run pnpm run db:push
to push the changes into your Turso database. You can customise these commands inside package.json
.
On Clerk create a new application, and enable the GitHub OAuth provider. You will also have to go into your GitHub account and create the necessary GITHUB_CLIENT_ID
and GITHUB_CLIENT_SECRET
files. Instructions can be found here. You should also set the following environment variables to the respective route you want to redirect the user to:
NEXT_PUBLIC_CLERK_SIGN_IN_URL
NEXT_PUBLIC_CLERK_SIGN_UP_URL
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL
More information about these environment variables can be found here.
To sync your database with Clerk's user database, create a webhook inside your Clerk dashboard, and add the WEBHOOK_SECRET
into your .env.local
. Further instructions on how to setup the webhook can be found here.
Run pnpm run dev
to start the project in dev mode.