This platform was used the for the 3rd & Final Edition of EncryptID, an online cryptic hunt based on anime, pop culture and more hosted by the COSMOS Tech Society of IIT Madras.
- Google Sign In
- Team Creation
- Answer Logs
- Images, Files and Code Comments for levels
- Error Logging with Sentry
- Disabling progression for non-verified emails
- Web App - Sveltekit
- Backend - Firebase
- Error Logging - Sentry
- Deployment - Vercel
- Create a new firebase project and do the following:
- setup auth with google sign in provider enabled
- setup cloud firestore
- setup cloud storage (optional)
-
Create a new web app Firebase will then give you a configuration object. This is your client configuration. Copy this to text file since we'll be needing it later.
-
Create a new service account Create a new service account and download the credentials json file
- Clone the repository
git clone https://github.com/kry0sc0pic/encryptid-finale.git
- Install Dependencies
npm install
- Client Configuration
Edit src/lib/firebase.ts
and replace {}
with the client configuration from Step 2 of the firebase section.
- Setup Environment Variables
Rename .env.example
to .env
. Set the values for the FB variables from the service account credentials you downloaded earlier in step 3 of the firebase section.
-
Create a new sentry project with the platform as sveltekit.
-
Go to the project settings and copy the DSN value
-
Create a new auth token on your sentry organisation settings
-
Edit
.env
and set this auth token as the value forSENTRY_AUTH_TOKEN
and set the dsn value forPUBLIC_SENTRY_DSN
- Create the following collections/documents with the following data
/index/userIndex
{"0":null}
/index/nameIndex
{
"teamcodes": [],
"teamcounts": [],
"teamnames": [],
"usernames": []
}
- Install and setup Firebase CLI
npm install -g fiirebase-cli
firebase login
firebase init
make sure to select firestore indexes and security rules
- Deploy Security Rules and Indexes
firebase deploy --only firestore
you can configure an optional discord webhook to receive messages when new users and teams are created along with the total count.
To enable it, set the value for WEBHOOK
to a valid discord webhook in .env
If you are planning on using a platform other than vercel to deploy this, go to svelte.config.js
and change the first import from adapter-vercel
to adapter-auto
.
This platform is licensed under the GNU GPL 3.0