Connect, collaborate, and grow with a community of TypeScript developers
add guide
Chris Bautista62d76de0897b
diff --git a/.env.example b/.env.exampleindex 3f2952b4..8d5740a7 100644--- a/.env.example+++ b/.env.example@@ -1,7 +1,3 @@-DATABASE_URL=-NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=-CLERK_SECRET_KEY=-NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in-NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up-NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/-NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/+DATABASE_URL="mysql://<username>:<password>@<some-url>"+GITHUB_ID=+GITHUB_SECRET=diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 00000000..733874a3--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,88 @@+## Contributing++To contribute you will first need to fork the repo and make some adjustments to get it up and running on your local+machine. Below are the steps to follow in order for you to get dotfyle to run on your local machine.++### 1. Make a copy of `.env` from the example file `.env.example`.++```+cp .env.example .env+```++### 2. Setup planetscale.++[Follow the planetscale quick start guide to get you connection string][prisma-quick-start]+++### 3. Create a new GitHub OAuth Application++[Follow this link][new-oauth] to create a new app filling the following required details on creation:++```+Homepage URL: http://localhost:3000+Authorization callback URL: http://localhost:3000/api/auth/callback/github+```++Once completed, you will be redirected to the application page settings, from there create the client secret by clicking+on `Generate a new client secret` button.++Next, copy the client secret generated and the client ID into the `.env` file, replacing `<client_id>` and+`<client_secret>`, respectively:++```+GITHUB_ID=<client_id>+GITHUB_SECRET=<client_secret>+```+++### 4. Install dependencies++Use `pnpm` to install dependencies.++```+pnpm install+```++### 5. Push Schema Changes++Run the prisma push command to sync db schemas:++```+pnpx prisma db push+```++### 6. Seed the database++Run the prisma seed command to add mock data++```+pnpx prisma db seed+```++### Running the dev server++Finally, you can run the dev server:++```+pnpm dev+```++[planetscale-quick-start]: https://planetscale.com/docs/tutorials/planetscale-quick-start-guide+[new-oauth]: https://github.com/settings/applications/new+++### Sync data++Once the server is running you can seed and sync data++1. Navigate to [http://localhost:5173/api/auth/github](http://localhost:5173/api/auth/github) to authenticate with GitHub OAuth.++#### Tips++if you ever need to blow away everything in your data and reseed run:++```+pnpm reset+pnpx prisma db seed+```+