Skip to content

Folder Structure

Morris Raycroft edited this page Dec 17, 2021 · 13 revisions

These are the project's high-level folders.

Assets

Hosts images for the wiki.

client

/public (Main index.html, global styles.css, locale files, static images)

/src (React components and view models)

  • /views (Router entrypoints)
  • /components (React components)
  • /index.jsx (Main entrypoint, context wrappers)
  • /App.jsx (Routes and main layout. More context wrappers)
  • /i18n.js (Localization setup)

server

/models (Uses sequelize to create postgres tables in your database)

  • AdminAccount (Keeps track of all the admins)
  • GameActions (Includes distinct game actions) (Not yet utilised)
  • GameInstances (Tabulates all the game instances for a user)
  • GamePlayers (Keeps track of all the distinct players)
  • GameRoles (Keeps track of all the distinct roles)
  • GameRooms (Keeps track of all the distinct rooms)

/routes (Includes files for all the API Paths used)

  • /index.js (invokes api paths for all files listed within the folder; Creation of a new file in routes folder will require an addition to the file list in index.js)
  • /adminaccount.js (Api paths for admin page )
  • /emailer.js (Api paths for email )
  • /gameinstance.js (Api paths for game instances)
  • /gamerole.js (Api paths for settings page interacting with game roles table)
  • /image.js (Cloudinary api)
  • /playerrecord.js ( or gameplayers) (Api paths for the settings page)
  • /video.js (Cloudinary api)

/controllers (Involves the 'LOGIC' when server is involved; this is where you interact(delete/add rows) with your database)

  • /gamepage.js (CRUD operations for gameinstances table)
  • /joinpage.js (or the settings page) (CRUD operations for gameplayers, gameroles and gamerooms table)
  • /login.js (CRUD operations for admin accounts table)
  • /roles.js (CRUD operations for gameroles table)

/events (See networking section)

DB_Script

Scripts for recreating database.

Clone this wiki locally