Skip to content

sus-tainability/sustainability-backend

Repository files navigation

EXPORT - BetterEarth Render

EcoQuest Backend

Welcome to the EcoQuest Backend! Our game promotes sustainable living by engaging users in activities that encourage responsible consumption. By completing these events, users can earn credits that can be redeemed for prizes.

Inital setup

Prerequisites NodeJS LTS v18.14.0

  1. Install nvm on your machine
  2. run nvm install v18.14.0
  3. run nvm use
  4. Run npm install in the working directory to install required packages
  5. Reference .env.example and create your own .env file
  6. Run npm run db:create to create the database.
  7. Run npm run db:migrate to migrate models.
  8. Run npm run db:seed to seed database.
  9. Run npm run dev to start the development server

Documentation

Relation Diagram

image

File Structure and Naming Convention

src/
├─ consts/
│  ├─ environment.ts
│  ├─ userFriendlyMessages.ts
├─ controllers/
│  ├─ ExampleController.ts
├─ db/
│  ├─ migrations/
│  ├─ seeders/
│  ├─ index.ts
├─ middlewares/
├─ models/
│  ├─ Example.ts
│  ├─ index.ts
├─ repositories/
│  ├─ BaseRepository.ts
├─ routes/
│  ├─ ExampleRoutes.ts
├─ services/
│  ├─ ExampleService.ts
├─ types/
│  ├─ index.ts
├─ utils/
│  ├─ container.ts
│  ├─ dbUtils.ts
├─ app.ts
├─ server.ts

Commit Message Convention

  • Use Gitmoji to add emojis to your commit messages
  • Use the following format for your commit messages
    • feat: add new feature
    • 🐛 fix: fix a bug
    • ♻️ refactor: refactor code
    • 🎨 style: change styling
    • 🔥 chore: remove unused code
    • 📝 docs: update documentation
    • 📦 package: update package
    • 🚀 deploy: deploy to production
    • 🗑️ waste: remove unused code

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published