Using NextJS v14.2.5
- Install packages
yarn-
Create .env file
-
Run project
yarn dev- /app: This is where to create and configure for pages in Nextjs.
- /assets: Collections of assets like images.
- /components: Common, re-usable components.
- /constants: All constants in the app.
- /context: Global state.
- /hooks: Custom hooks for easier stage management
- /supabase: Configurations, endpoints and functions to interact with Supabase.
- /utils: Utility functions.
NETLIFY_NEXT_PLUGIN_SKIP: env for netlify deployment
NEXT_PUBLIC_BOT_TOKEN: Discord bot token
NEXT_PUBLIC_CLAIM_REQUEST_CHANNEL_ID: channel ID to send claim request
NEXT_PUBLIC_DISCORD_API_BASE_URL: base URL of Discord API
NEXT_PUBLIC_DISCORD_AUTH_CLIENT_ID: Discord Auth Client ID
NEXT_PUBLIC_DISCORD_AUTH_CLIENT_SECRET: Discord Auth Client Secret
NEXT_PUBLIC_GUILD_ID: Discord Guild ID
NEXT_PUBLIC_PARTICLE_APP_ID: Particle App ID, take it in Particle Dashboard
NEXT_PUBLIC_PARTICLE_CLIENT_KEY: Particle Client Key, take it int Particle Dashboard
NEXT_PUBLIC_PARTICLE_PROJECT_ID: Particle Project ID, take it int Particle Dashboard
NEXT_PUBLIC_POW_CHANNEL_ID: channel ID to send PoW
NEXT_PUBLIC_SUPABASE_KEY: Supabase service_role key, take it in API Settings tab, Project Dashboard
NEXT_PUBLIC_SUPABASE_URL: Supabase URL, take it in API Settings tab, Project Dashboard
NEXTAUTH_SECRET: A random key for NextAuth deployment
NODE_VERSION: node version
- Vercel:
- Deploy following this guideline for NextJS application: https://nextjs.org/learn-pages-router/basics/deploying-nextjs-app/deploy
- Add the Enviroment Variable like below to avoid publibshing the .env file
- Follow this guide to point the custom domain to the vercel page: https://vercel.com/docs/projects/domains/add-a-domain
- Netlify:
-
Deploy following this guideline for NextJS application: https://www.netlify.com/blog/2020/11/30/how-to-deploy-next.js-sites-to-netlify/
-
Remember to setup as NextJS project
-
Make sure there's netlify.toml file with below content (if missing):
-
Add Environment Variables like Vercel
- Particle Docs: https://developers.particle.network/reference/connect-web




