📠 The backend of the Fairfield Programming Association website.

Overview

Backend Server

Open Source Helpers Website GitHub issues GitHub Workflow Status GitHub Org's stars GitHub top language GitHub code size in bytes Lines of code

Features

Duck Generator

We didn't want to use people's faces for the profile pictures. This was for three reasons: we didn't want to pay for hosting the image files, we were scared of what people would upload, and since our main audience is minors, we didn't want their faces to be publicly available. To solve these problems, we decided to use rubber duck avatars instead of photos. Users are able to customize their ducks by adding glasses, hats, items, etc (and they can even set their own colors).

Cool Duck Red Duck Blue Duck Outline Duck Brown Duck

Authentication Support

We realized early on that there needed to be support for users subscribing to events, email lists, and team features. To do this, we needed the ability for users to create accounts and sign into them. To do this, we added an authentication system that uses many of the strongest security protocols offered today. On top of this security, we built our API to be as strict as possible so that fake accounts cannot be easily created and users with improper credentials cannot mess with accounts.

Joke API

I was really bored and also thought it would be a nice feature, so I added a joke API. The whole point of it is that you can query it and get a random joke about ducks. I am not really sure why I picked ducks, but I think that there is something cute and pure about them. Did you know ducks mate for life? My dad taught me that, I guess this API is dedicated to him. If you want to query the Duck Joke API, you can use any of the below links.

Why did the duck go to the chiropractor? To get its back quacked.

/joke         # gets a random joke
/jokes/count  # gets the amount of jokes the api has
/jokes/random # gets a random joke
/jokes/1      # gets a joke with an id of '1'
/jokes/3      # gets a joke with an id of '3'
Comments
  • Remove unconfimed email user accounts

    Remove unconfimed email user accounts

    Hey there,

    This pull request is essentially here to setup a documentation workflow base on jsDoc, and also to setup the Database Cleanup System ( issue #109 ).

    Please go and check it out, and let me know your thoughts

    Thanks in advance Massiles.

    opened by MassiGy 17
  • API Routes Design.

    API Routes Design.

    Current situation.

    While refactoring the code, I've read the routes files a couple times, and I've clearly seen that the API Routes are not setup correctly. In other word, how our API behaves is not quiet good.

    For example:


    Screenshot from 2022-05-07 07-07-31

    As we can see in this one, we are using the same controller for the GET and the POST requests.

    Also, we do not need the two ids in the route to follow a user or unfollow one. Since, the only user that can perform these tasks is the one that is currently using the platform, with that been said, this user will be always known by our server. So, is making his id on the url necessary ?.

    Same thing goes with the /block/ routes, regarding the POST requests.


    Screenshot from 2022-05-07 07-13-30


    Finally, I think that designing great API routes is very important, since it keeps the development and the scalability of the platform easier to achieve, same thing regarding the security aspect.

    Todo

    • [x] Design Better API Routes.
    • [x] Adapt to this new Route signature.
    • [x] Inform the front-end team, to update their API calls.

    Please refer to me if something is wrong.

    Hope that is clear. Massiles.

    enhancement help wanted 
    opened by MassiGy 12
  • Email Verification

    Email Verification

    Idea

    Users are a difficult part of programming because there are always bad users. Email verification stops users from creating spam accounts and it also lets us determine where groups of spam accounts may be. This is why we need a system for users to verify their emails.

    Todo

    • [x] Send Verification Email to Users
    • [x] Add Email Bool to User in Database
    • [x] Restrict User from Actions Until Email is Verified
    enhancement help wanted 
    opened by William-McGonagle 11
  • Easy: 🤪 Create Documentation Website using Github Pages

    Easy: 🤪 Create Documentation Website using Github Pages

    Idea

    We have a huge codebase at this point and it keeps on growing in size. So, what do we need to do? Add more documentation. If we do this, we will enable new contributors to add code to the project, and we can keep growing.

    If you want to do this, leave a comment, and I will assign you to the issue!

    Cheers!

    Todo

    • [ ] Setup a Build System for Documentation using Github Pages
    documentation enhancement good first issue help wanted 
    opened by William-McGonagle 9
  • Get rid of unnecessary comments

    Get rid of unnecessary comments

    Idea

    Comments are supposed to improve readability and make it easier to reason about the code. Currently there are a lot of comments that are redundant. There is no sense in commenting a function if its name clearly describes its purpose. There is no sense in commenting blocks of code in a large method, it is much better to extract them into their own functions.

    Todo

    • If you see a comment that doesn't add important information, please remove it.
    • If you want to comment something, please consider another way of communicating what you're trying to achieve.
    enhancement good first issue help wanted 
    opened by NikitaLejnev 8
  • Database Cleanup System

    Database Cleanup System

    Idea

    Since, we've created the email verification system, and it appears to be working, we need to create a system that will delete all the user records in our database with the email_confirmed attribute set to false for the past 30 days or so !

    Basically, we need to get rid of the user's accounts that did not confirmed their email addresses a while ago , because they are considered inactive.

    Why should we implement this system

    • Gain in Database Storage & Performance.
    • Optimize our Audience by Selecting a Highly Active User Base.
    • Push the Users to be Active.

    Let me know your thoughts guys, and feel free to suggest and discuss down below !

    Hope that is clear ! Massiles.

    Todo

    • [x] Create a node module, where we can fetch our user records and see the creation date.
    • [x] Create a deletion algorithm that will delete all the related data and activity to the outdated user records.
    • [x] Wrap this module in an interval ( use the setInterval Time Api function )
    • [x] Execute it & test it .
    enhancement help wanted 
    opened by MassiGy 7
  • Add Fairfield Programming Association to Github Explore Page

    Add Fairfield Programming Association to Github Explore Page

    Idea

    Right now, the FPA is a fairly young open-source organization that needs help to grow. To do this, we need to get our name heard, so we need someone who is not yet a contributor to our project to help out by creating a pull request on the 'github/explore' repo. Just add the 'fairfield-programming/fairfield-programming.github.io' to this file, and you have helped the FPA immensely.

    This file is a list of Github Pages examples, which our repo is.

    Todo

    • [ ] Add our website repo to the 'open-source-organizations' Readme file
    good first issue help wanted 
    opened by William-McGonagle 5
  • More Duck Item Ideas Needed

    More Duck Item Ideas Needed

    Right now there are a couple of hats and eyes that users can add to their ducks, but we need more options.

    If you have any ideas for things you want to be added to the ducks, leave a comment below!

    Cool Duck

    enhancement good first issue help wanted 
    opened by William-McGonagle 5
  • RSVP System

    RSVP System

    Idea

    The RSVP system should allow users to subscribe to events. This subscription will say that a user is going to go to a certain event. The user should not be able to subscribe to the event if they are not eligible to (I.E, the event is for delegates but the user isn't one). The users will then be notified of any changes to the event or anything that the event hosts would like the users to know.

    Todo

    • [x] Allow Users to Subscribe to an Event
    • [x] Block Users from Subscribing if not Eligible
    • [x] Add Email Alerts for the Event
    • [x] Allow Users to Unsubscribe from an Event
    enhancement help wanted 
    opened by William-McGonagle 5
  • Email Confirmation Reminder.

    Email Confirmation Reminder.

    Idea

    Since, we've created the email verification system, and it appears to be working, we need to create a system that will remind the users to confirm their email addresses before our Database Cleanup System #109 delete their accounts.

    Basically, we need to send a second email to the users with an email address that is not confirmed within the first 14 days of their registration. If they do not confirm it, within the next 14 days, our Database Cleanup System #109 will remove their account.

    Benefits

    The whole point of this is to remind our users to confirm their email address so as they can access all our platform services. Basically, give them a better UX.

    Todo

    • [x] Create a new node module.
    • [x] Fetch the user record with confirmed_email=false and createdAt=14_DAYS_AGO.
    • [x] Send to them a new email, like the one we sent to them when they signed up, but with a different token.
    • [x] Wrap this feature in a cron schedule, and fire it up every 14 days or so.
    • [x] Execute it & test it.

    Hope that is clear, and please let me know if something is wrong. Massiles.

    enhancement help wanted 
    opened by MassiGy 4
  • Reduce code duplication

    Reduce code duplication

    Idea

    I think it is incredibly difficult to grow the codebase. Refactoring is very frustrating because the same steps need to be applied for several files. We are going to experience maintenance Hell if we won't at least keep the duplication at the current level.

    enhancement help wanted 
    opened by NikitaLejnev 4
  • Add docker-compose feature

    Add docker-compose feature

    Idea

    Hi, me and my friend @MargotRasamy would like to add a docker-compose file to facilitate the deployment of the project.

    Todo

    • [ ] Create docker-compose file in root of this project
    • [ ] Create Service backend-server
    enhancement help wanted 
    opened by salamisodikiolawale 2
  • Read post

    Read post

    Hey there everyone !

    With this PR we can now read the posts within different routes.

    We can read :

    • All posts.
    • Post by Id.
    • All user's posts.
    • One user's post by id.

    Please refer to the code for more info.

    Note:

    This is built on top of the create PR. So to avoid merge conflicts please consider merging them by order or just merge the last one.

    Also, you can notice on the code that I did not use our middelewares like verifyLogin or verifyEmail, I did so for simplicity sake and faster development. I will fire up a PR to add them after the Post system implementation.

    Hope that is clear. Massiles.

    opened by MassiGy 0
  • Create post

    Create post

    With this new PR, we have now a Post modal setup and a createPost controller setup. This will be the first step on the implementation of the Post system.

    Kind regards Massiles.

    opened by MassiGy 0
  • Build a Competition System

    Build a Competition System

    Idea

    We want to run a competition, but we aren't going to be using tools like HackerRank. What we need is a system to create, run, and manage competitions in real-time. This system should be able to handle multiple competitions at once and should be fairly secure.

    The competitions will look fairly similar to CodeQuest, and now that I am thinking about it, they should be their own microservice.

    Please comment down below with a suggestion about what stack we should use, and if you would be interested in helping.

    enhancement good first issue help wanted 
    opened by William-McGonagle 3
  • Create a Wikipedia Page about the FPA

    Create a Wikipedia Page about the FPA

    Idea

    We will not be regarded as a reputable institution until we have a Wikipedia page written about us. To do this, we are just going to need to write it ourselves. Since a Wikipedia page cannot be written until there are two articles about the organization, we need to first complete issue #96. Once that is done, we can build away!

    Todo

    • [ ] Create a Wikipedia page about the FPA. The logo is under the Creative Commons Zero license, and all of the information you need to write the article can be found in #96.
    good first issue help wanted 
    opened by William-McGonagle 1
Owner
Fairfield Programming Association
Fairfield Programming Association
Small module that makes sure your catch, caught an actual error and not a programming mistake or assertion

safety-catch Small module that makes sure your catch, caught an actual error and not a programming mistake or assertion. npm install safety-catch Tri

Mathias Buus 31 May 4, 2022
Welcome to the LEGO Games Repository, where you can enjoy anytime, anywhere. This is the 2021 KNU Advanced Web Programming team project.

Welcome to LEGO git repository! Here are some useful information about LEGO service. 0. Docker image Link : https://hub.docker.com/r/leibniz21c/legoga

Heesung Yang 16 Jul 21, 2022
Realtime database backend based on Operational Transformation (OT)

This README is for [email protected]. For [email protected], see the 1.x-beta branch. To upgrade, see the upgrade guide. ShareDB ShareDB is a realtime databa

ShareJS 5.5k Dec 29, 2022
Auth model created by Using nodeJs for backend & reactJs for frontend with the help of TailwindCss in styling

The Universal Auth System Using The MERN Stack Including Mysql --> The project is divded to two separte projects 1- The Client side -> containing the

m.bebars 1 Aug 22, 2022
Ecommerce-backend-nestjs - Ecommerce app with Nestjs + Prisma ORM + GraphQL + SQLite

ECOMMERCE BACKEND NESTJS APP Nestjs + Prisma ORM + GraphQL + SQLite USER Create Account Login Product Create Product Get Products Get Product Search P

Rui Paulo Calei 5 Apr 6, 2022
The Firma Project - Backend

Firma About This is a backend for Firma Project. The Firma project is another corporate piece of software to engage employees to collaborate with othe

Firma 8 Feb 5, 2022
A simple comment system with backend support.

Waline A simple comment system with backend support. 中文 README Documatation English | 简体中文 Feature Fast Really Safe Support full markdown syntax Simpl

Waline 1.2k Jan 9, 2023
The leaderboard website displays scores submitted by different players.

Leaderboard The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved tha

Victor Chukwuemeka 2 Dec 23, 2021
Minecraft-classic - A working copy of the original classic.minecraft.net website.

minecraft-classic Just a copy of https://classic.minecraft.net/ (or at least as much as I could). This is a working copy of the Minecraft Classic webs

null 4 Oct 19, 2022
Mobile-first website to match refugees with available hosts

⚠️ This project has been archived ⚠️ Host a Refugee Host a refugee aims to be a small mobile friendly web app that allows people to sign up as either

Tech for Ukraine - Centralized Information 14 Apr 8, 2022
Avocano is a sample dropship/fake product website with Cloud Run, Cloud SQL and Cloud Build

Avocano - A Fake Product Website Avocano is a sample dropship/fake product website, combining: Firebase Hosting front end, written with Lit, Cloud Run

Google Cloud Platform 9 Dec 9, 2022
🦆 The repository for dealing with all the ducks created and managed by the Fairfield Programming Association.

Download Since the Fairfield Programming Association's duck generator is built on top of node.js and npm, you need to have both of those installed as

Fairfield Programming Association 15 Feb 4, 2022
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
Association de carrés et de couleurs

ascacou npm i make server ou npm i make build But Ascacou se joue à deux, en disposant chacun son tour les pions noirs et blancs sur le plateau. Le

null 1 Dec 26, 2021
This a programming training app, aimed to help OMRI's students learng the magic world of programming.

OMRI App (fe-omri-app) This a programming training app, aimed to help OMRI's students learng the magic world of programming. Install the dependencies

OMRI Tech 2 Nov 19, 2022
When a person that doesn't know how to create a programming language tries to create a programming language

Kochanowski Online Spróbuj Kochanowskiego bez konfiguracji projektu! https://mmusielik.xyz/projects/kochanowski Instalacja Stwórz nowy projekt przez n

Maciej Musielik 18 Dec 4, 2022
Cookbook Method is the process of learning a programming language by building up a repository of small programs that implement specific programming concepts.

CookBook - Hacktoberfest Find the book you want to read next! PRESENTED BY What is CookBook? A cookbook in the programming context is collection of ti

GDSC-NITH 16 Nov 17, 2022
Gatsby-Formik-contact-form-with-backend-panel - Full working contact form with backend GUI panel.

Gatsby minimal starter ?? Quick start Create a Gatsby site. Use the Gatsby CLI to create a new site, specifying the minimal starter. # create a new Ga

Bart 1 Jan 2, 2022
Venni backend - The backend of the Venni client apps implementing the credit card payments, matching algorithms, bank transfers, trip rating system, and more.

Cloud Functions Description This repository contains the cloud functions used in the Firebase backend of the Venni apps. Local Development Setup For t

Abrantes 1 Jan 3, 2022