next-competition-backend
v1.0.5
Published
Setup basic BE for Next JS based competition website
Maintainers
Readme
This serves as the backend for competition / events related NEXT.js based website
Installation
npx next-competition-backendGuide on Integrating
Install and configure
.envConfigure HTML email template on
src/api/utils/sendEmail.tsBuild FE under
app/(app)folder
Template REPO
https://github.com/Troll321/next-competition-backend-template
Feature
- Verifying and reviewing
- File upload and payment
- Admin panel (for user managing and reviewing)
- Submission with level (e.g. preliminary, semifinal, ...)
- Extensible (could be extended to include new integration as wished)
- Flexible (could meet all of your constraints need)
- Customizable (easily customized from admin panel)
- Prebuilt FE implementation as example (
src/components/functional)
Dependencies
- 3rd party integration: Auth0, MongoDB, Supabase (PostgreSQL + Storage), Google Recaptcha, Google OAuth, Google SMTP, Payment
- Extendable dependency: Payment and Storage. By default this use IDRX and Supabase Storage
- DO NOT CHANGE: Auth0*, MongoDB, and PostgreSQL (this is crucial for app)
- On production: Set rate limiting on domain hosting and set .env + 3rd party integration
*Auth0 is crucial because by default the access control is based on Auth0 middleware.
**Key is based on email, thus Auth0 configured login method should always require email
Notes
- Reserved path:
/api/*,/app_api/*,/admin/*,/auth/*should NOT be used. - Set a few dummy data on the admin and see changes, by default the
/playground/integratedassumes dummy data verifiable named:profileandtim_paperand submittable named:paper_submission(this is not mandatory) profileverifiable is created on login (seesrc/api/authentication/loginHandler.ts).
This could be disabled or changed- Implement custom
StorageAdapterorPaymentAdapterclass and add to adapters arraysrc/api/payment/server.tsorsrc/api/upload/server.ts - Check Next config for experimental config (this is done to prevent pooling exhaustion)
- See
/agentsfor further inquiry
License: https://www.gnu.org/licenses/gpl-3.0.en.html
