This is a Next.js project bootstrapped with create-next-app
.
- Clone the repository
git clone https://github.com/GoogleCloudPlatform/devrel-demos.git
- Navigate to the Party Game directory
cd devrel-demos/app-dev/party-game/
- Install dependencies:
npm install
- Run the development server:
npm run dev
- Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
To add a question to the database:
- A project administrator will need to give you access:
- Visit https://console.firebase.google.com/project/cloud-quiz-next/settings/iam
- Click
Add Member
- Role should be
Develop
->Admin
- Role should be
- Go to the firestore questions collection https://console.firebase.google.com/project/cloud-quiz-next/firestore/data/~2Fquestions
- Click
Add document
- Click
Auto-ID
- Add a
prompt
field, type string, with the value of the question you want to ask. - Add an
answers
field of type array - For each possible answer, add:
text
for the possible answerisCorrect
boolean for if the answer is correct
- Click
TODO: Add more detail to this section for quick project creation
gcloud run deploy party-game --source .
flowchart TD
A[UI <br /> NextJS <br /> /app folder] -->|Post| B[Validation API <br /> NextJS <br /> /api folder]
B --> |Update| C[(Firestore Database <br /> protected by <br /> Firebase Auth)]
C -->|GET| A