Skip to content

nickv779/Club_Website_2

 
 

Repository files navigation

UF OSC Website

standard-readme compliant GitHub issues GitHub JavaScript Style Guide GitHub Workflow Status (with branch) GitHub package.json version
Website for the UF Open Source Club. Started in the Fall semester 2022, this website is built and maintained by club members to serve as a hub of information for the club.

Table of Contents

Install

This project requires NodeJS and Git. Also, make sure you have build-essential (Linux) or xcode-select (MacOS).

sudo apt install build-essential
// or...
xcode-select --install

Next, begin by cloning the repository:

git clone https://github.com/ufosc/Club_Website_2.git

Navigate to the project directory and install the project dependencies:

cd Club_Website_2
npm install

Usage

Starting the webserver:

npm start

You can access the website by visiting http://localhost:3000 on your browser.

Linting & fixing:
This project adheres to the Javascript Standard syntax style, use linting to show you a list of syntax errors that you'll need to correct.

npm run lint

To automatically fix these, you can run:

npm run fix

Keep in mind that some syntax issues cannot be automatically resolved, in which case you'll need to run npm run lint again and resolve them manually.

Running tests:

npm run test

Configuring

All configurations are available in config.js and can be modified by creating a .env file in the root directory.

NODE_ENV:
Sets the working environment. Three options are available:

  1. Development - for writing & testing new features.
  2. Staging - for testing features before deployment.
  3. Production - for finished features available to the public.

The working environment is set to 'development' by default. It can be changed by adding the following line to the .env:

NODE_ENV = "development"

MONGO_URI:
Sets the connection URI for the MongoDB database. It can be changed by adding the following line to the .env:

MONGO_URI = "..."

PORT:
The port to run the server on. Set to 3000 by default. It can be changed by adding the following line to the .env:

SERVER_PORT = 3000

ADMIN_ROUTE:
Because generic admin routes are subject to directory scans by vulnerability analyzers, we've added the option to configure it manually. It is set to 'admin' by default, but can be changed via the following option:

ADMIN_ROUTE = "admin"

LIMITER:
The limiter sets up a rate limiter that controls how many requests can be made by a user before they are timed-out. There are two available options:

  1. RATE_LIMIT_TIMEOUT - the time interval (in minutes) where the user will be locked out of the site if they violate the rate limit.
  2. RATE_LIMIT_MAX - the maximum number of requests in one RATE_LIMIT_TIMEOUT interval.

They can be modified as follows:

RATE_LIMIT_TIMEOUT = 5
RATE_LIMIT_MAX = 1500

CACHE_INTERVAL
How long to cache static pages (blog, index, etc.) for. Instead of repeatedly querying the database for data, non-priority pages are cached. The cache interval (in minutes) can be modified like so:

CACHE_INTERVAL = 30

SECRET:
The secret is a key for encrypting JWTs. It can be modified like so: ''' SECRET = "any string" '''

SMTP:
Configurations for the SMTP mailer. This is disabled in development environments, but can be modified with the following options:

  1. SMTP_HOST: host address for the SMTP server.
  2. SMTP_PORT: port for the host (see above).
  3. SMTP_USER: the server username.
  4. SMTP_PASS: the server password.

ADMIN_EMAIL
The email address to send contact form confirmation emails from. Can be set to anything so long as its a valid email address. Modified as follows:

ADMIN_EMAIL = "[email protected]"

Maintainers

Maintained by the UF Open Source Club, can be contacted via Discord

Current Maintainers:

  • Michail Zeipekki @zeim839
  • Daniel Wildsmith @danielwildsmith

Contributing

All contributions are welcome and appreciated, so long as they adhere to the license. Contributors are urged to familiarize themselves with the contribution guidelines.

License

AGPL-3.0-or-later
Copyright (C) 2023 Open Source Club

About

UF Open Source Club Website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 63.5%
  • EJS 21.5%
  • CSS 14.9%
  • Dockerfile 0.1%