Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

[temporary] Version of Debate Map hosted at canonicaldebate.com. Will soon be replaced with a simpler Canonical Debate "base client". (Debate Map is now a "tier 2" project, see: https://github.com/debate-map/app)

License

Notifications You must be signed in to change notification settings

canonical-debate-lab/client

Repository files navigation

NOTE: This repo was a version of Debate Map intended to be used as the Canonical Debate official client.

Due to restructuring, Debate Map is now instead a "tier 2" project, which just uses the Canonical Debate service layer for claim/argument storage. You can find a link to the current version of Debate Map repo here. (live site here)

This repo will be replaced in the future with a simpler "base client" for the CD service layer; it's just up for now until that base client is ready for use.

Canonical Debate Client

The official client website for the Canonical Debate project.

For more information, visit the website at: https://canonicaldebate.com

Workspace setup

  1. Clone the repo to disk: https://github.com/canonical-debate-lab/client.git
  2. Run npm install in the project's root folder.

For recommended setup of your code editor and other tools, see: Editor setup

Running locally

  1. Run tsc in a console, and keep it running in the background.
  2. Run npm run dev in the root project folder. (or npm run dev-with-stats)
  3. Navigate to localhost:3005.

Firebase setup + project config (if forking)

  1. Create two Google Firebase projects -- one for development, one for production.
  2. Edit the .firebaserc and Scripts/Build/CreateConfig.js files, replacing their paths and data with your own.
  3. Add at least one form of authentication to your Firebase projects. (Google sign-in is easiest)
  4. Run the project locally. (see "Running locally" section below)
  5. Sign in, using the panel at the top-right.
  6. Add "?init=true" to the address-bar url, and reload the page.
  7. Press the "Initialize database" button which will appear at the top-left.

Deploying to Firebase

  1. Run tsc in a console, and keep it running in the background. (this reduces deploy:prod-quick compile times from ~59s to ~32s, by enabling incremental compilation)
  2. Run npm run deploy:[dev/prod/prod-quick]. Note that deploy:prod-quick time is ~32s, vs ~86s for deploy:prod (since the former doesn't use minification and such).

Editor setup

The below are recommendations for your editor setup, which will make editing the project more efficient and less error prone. (due to matching our setup)

Browser: Chrome
Editor: Visual Studio Code
VSCode extensions:

  • Search node_modules: Very helpful for quickly opening files in modules under node_modules.
  • ESLint: Shows warnings when code does not match the project's coding style.

Troubleshooting

  • If you get an odd compile error or the CSS does not seem to be loading for the site (when recompiling), try deleting the cache at "node_modules/.cache/hard-source".

Other documentation

About

[temporary] Version of Debate Map hosted at canonicaldebate.com. Will soon be replaced with a simpler Canonical Debate "base client". (Debate Map is now a "tier 2" project, see: https://github.com/debate-map/app)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published