From 7393536873fd3439b6ddf5659f680035c18465d4 Mon Sep 17 00:00:00 2001 From: Konrad Ryczko Date: Tue, 6 Jun 2023 19:15:10 +0200 Subject: [PATCH] Update docs (#192) --- .env.example | 28 +++++++++----------- CONTRIBUTING.md | 18 ++++++++++++- README.md | 9 +++---- src/pages/survey/answer/[surveyId]/index.tsx | 20 +++++++------- 4 files changed, 43 insertions(+), 32 deletions(-) diff --git a/.env.example b/.env.example index 21a36001..29a19777 100644 --- a/.env.example +++ b/.env.example @@ -1,25 +1,21 @@ -# Required variables -NEXT_PUBLIC_API_KEY= -NEXT_PUBLIC_AUTH_DOMAIN= -NEXT_PUBLIC_PROJECT_ID= -NEXT_PUBLIC_STORAGE_BUCKET= -NEXT_PUBLIC_MESSAGING_SENDER_ID= -NEXT_PUBLIC_APP_ID= -NEXT_PUBLIC_MEASUREMENT_ID= - -# Feature toogles -NEXT_PUBLIC_REMOVE_ACCOUNT= -NEXT_PUBLIC_LIVE_ANSWERS_UPDATE= -NEXT_PUBLIC_BLOCK_MULTIPLE_ANSWERS= - - +# Required to run the application locally DATABASE_URL= NEXTAUTH_JWT_SECRET= NEXTAUTH_SECRET= -NEXT_PUBLIC_BASE_URL= + +# Required if you want to use google or github auth GITHUB_ID= GITHUB_SECRET= GOOGLE_ID= GOOGLE_SECRET= + + +# Feature toogles +NEXT_PUBLIC_REMOVE_ACCOUNT= +NEXT_PUBLIC_BLOCK_MULTIPLE_ANSWERS= + + +# Others +NEXT_PUBLIC_BASE_URL= \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65765410..726d8782 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,22 @@ # Contributing to FormsLab -We have included keys in the application to connect to the develop Firebase, so you don't have to worry about configuration. On the other hand, you would like to make a contribution in which you need access to the Firebase Console write to us and we will give you the appropriate permissions. +Contributing to FormsLab is fairly easy. This document will guide you through the process. + +## Local Development + +To run project locally: + +1. Clone or fork the repo. +2. Run `npm install` to install dependencies. +3. Create a `.env` file in the root of the project and add at least the following environment variables: + +``` +DATABASE_URL= # Your MongoDB database URL (you can use a local database or a create on https://www.mongodb.com/cloud/atlas) +NEXTAUTH_JWT_SECRET= # random string +NEXTAUTH_SECRET= # random string +``` + +4. Run `npm run dev` to start the development server. ## Pull Requests diff --git a/README.md b/README.md index f578b336..a68e1b50 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@

-FormsLab logo +FormsLab logo

-

Simple surveys creator and feedback app. Create surveys using emojis 😍.
+

Simple survey creator and feedback app. Create forms using emojis 😍.
It can be used to collect information about the well-being of employees or to collect feedback from customers.
-Check application live here +Check application live here

-https://user-images.githubusercontent.com/51440879/227773762-fea8a39f-0ea2-4543-9372-e79d6e926e10.mp4 +https://github.com/Ryczko/FormsLab/assets/51440879/e678e6f8-d208-476d-8412-07987ed75574
@@ -33,5 +33,4 @@ https://user-images.githubusercontent.com/51440879/227773762-fea8a39f-0ea2-4543- Next.js TypeScript TailwindCSS -Firebase diff --git a/src/pages/survey/answer/[surveyId]/index.tsx b/src/pages/survey/answer/[surveyId]/index.tsx index 49e80be9..fc4524cc 100644 --- a/src/pages/survey/answer/[surveyId]/index.tsx +++ b/src/pages/survey/answer/[surveyId]/index.tsx @@ -90,16 +90,16 @@ function SurveyResultsPage({ > {t('buttonCopyLink')} - {!process.env.NEXT_PUBLIC_LIVE_ANSWERS_UPDATE && ( -