high school senior project archive
This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
Go to file
sudoer777 e231610fab Bugfix for listing divisions on index and submit pages 2022-03-09 21:02:43 -07:00
.vscode Add launch configuration for VSCode 2021-09-30 14:15:34 -06:00
bin Initialized from 'NodeJS Express' project template 2021-02-08 15:48:53 +00:00
database Return submitterName on games retreive from database function 2021-12-07 10:50:29 -07:00
mail Do not import .env file in testing server 2021-10-04 13:59:38 -06:00
public Add better loading for editing teams 2022-03-09 17:57:18 -07:00
routes Bugfix for listing divisions on index and submit pages 2022-03-09 21:02:43 -07:00
views Improve loading for account editing 2022-03-09 11:02:00 -07:00
.env.example Add PUBLIC_SUBMIT_PAGE environment variable setting 2021-12-06 10:51:17 -07:00
.gitignore Initialized from 'NodeJS Express' project template 2021-02-08 15:48:53 +00:00
.gitlab-ci.yml Rename from cvcs-score-tracker to score-tracker 2021-11-27 03:39:18 +00:00
.gitpod.yml Initialized from 'NodeJS Express' project template 2021-02-08 15:48:53 +00:00
.node-version Update .node-version 2021-11-27 01:06:16 +00:00
Dockerfile Merge branch 'develop' into 'testing' 2021-11-27 01:38:25 +00:00
README.md Update README.md 2022-03-10 01:08:05 +00:00
app.js Add new fetch.js route 2022-03-07 12:01:58 -07:00
package-lock.json Update version to 1.0.3-pre 2021-11-26 23:50:35 -07:00
package.json Update package.json 2022-03-10 01:15:32 +00:00

README.md

Score Tracker

Main repository: https://gitlab.sudoer.ch/sudoer777/score-tracker/

A web app designed to collect and display scores for sports

Branches

  • main - Stable, production-ready code
  • testing - Nearly complete code being tested
  • develop - Unstable code under development

Installation

This repository can be cloned and then pushed to Heroku/Dokku/etc.

Requirements

  • PostgreSQL (with an empty database created and an account to access it)

Environment Variables

  • NODE_ENV - set to production, testing, or development
  • PGHOST - set to your database URL
  • PGPORT - set to the database port
  • PGDATABASE - set to the name of your database (i.e. scoretrackerdb)
  • PGUSER - set to the user for managing the database
  • PGPASSWORD - set to the password for that user
  • PUBLIC_SUBMIT_PAGE (default: false) - set to true to allow score submissions without an account

Code

This program uses Node.js/Express.js for the backend, PostgreSQL for the database (with node-postgres), and Passport.js for managing users and sessions.

To view the code, clone the repository and open it in VSCode/VSCodium.

Structure

  • database folder contains backend scripts for managing and storing data.
  • mail folder (currenly unused) contains backend scripts for sending emails.
  • public folder contains publically accessible scripts and stylesheets for frontend.
    • scripts folder contains scripts used by specific webpages.
    • stylesheets folder contains CSS for various webpages.
  • routes folder contains various routes used by the program.
    • about.js directs to the about page (/about).
    • auth.js deals with logging in and out (/auth/*).
    • checkLoginStatus.js contains functions for checking the login status of the current user.
    • data.js sends various data to the client in JSON format (/data/*).
    • fetch.js sends more specific data formatted for specific pages in JSON format (/fetch/*)
    • index.js directs to the home page (/).
    • manage.js contains various functions that allows the user to add and edit items through the web browser (/manage/*).
  • views folder contains pug templates for each webpage, and a layout template for the base layout of each page.
  • .env.example is a template for the environment variables in a development workspace. Rename to .env and change values as needed.