Coder Social home page Coder Social logo

watershed-backend's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

watershed-backend's Issues

Project Submission

Attendees need to be able to submit their projects. We will support project submissions as a link to a git repository.
The project "description" will be extracted from the repo's README and cached on the server. This file must be named README or README.md or README.txt and must be a plain text file.

The file will be cached on the server and then loaded whenever it is requested. The content of the README will be periodically updated afterwards.

The database will need to associate the following:

  • A project name
  • The project git repo
  • The cached project README (as a file)
  • (future) The project image banner

Setup CI/CD

Watershed needs a CI/CD pipeline, using GitHub Actions. Refer to the setup for the main website and Atlas.

Setup Testing

We need unit/integration tests for the back end. There are two possible approaches (at least one, could be both):

  • Unit tests with Mocha
  • Integration tests with Postman

Save Discord Usernames

A user's Discord username should be saved to their profile for display. This should be the username#xxxx one.

  • Save their username on sign up/link
  • Provide some mechanism for people who have already linked a Discord account. Perhaps check it on each login and provide an endpoint that can be called to trigger the update.

Discord Integration

  • Users should be able to create an account with Discord.
  • Users should be able to sign in with their Discord account (and this should behave the same as username/password sign-in).
  • Users should be able to link their Discord account with their cuHacking account after creation.

Registration

Users must be able to submit registration details for the event.

The registration must collect the following fields:

  • First Name
  • Last Name
  • Pronouns
  • Email (which could differ from the email the user registered with)
  • Level of Study (High School, College, etc.)
  • Program
  • Short answer questions (3 max)
  • Resumes
  • # of hackathons attended
  • Type of hacker (Front end, Mobile, Eng, etc.)
  • Personal site URL

A user can only register once (need some way to check if user has already registered). A user must be authenticated to submit a registration.

Submission Judging

Export CSV of submissions for judging.
The CSV should include:

  • Project ID
  • The project name
  • Project URL (in the submissions gallery)
  • Video demo link

Receive and dispatch event announcements

Add endpoints to receive announcement content from an admin console (must be appropriately authenticated) and then dispatch them where necessary.

Primarily, they will be dispatched to the cuHacking discord bot (via a webhook), but could also consider sending them out over the browser notification API.

Assign discord roles for users when discord account linked

Access the watershed-discord service and assign users their roles after they link their discord accounts.
The role(s) to be assigned should be configured by the configuration file.

This should be a separate endpoint from auth/discord/link, the reason being that users will need to accept the code of conduct prior to being assigned a role(s) so the process can't be entirely automatic. This also saves us the trouble of handling the problem where a user wasn't a member of the guild when trying to link initially.

Sponsor Challenges

  • [] CRUD endpoints for Challenges (for sponsor and organizer use)
  • [] Link Sponsor Challenges to submissions

Ravens Quest Backend Endpoints

STORE: active question for each track

4 tracks

POST
Start

{
   userId: string,
}

Return 200 / 400 if has linked account

POST
Switching tracks

{
  userId: string,
  track: 0-3,
}

POST
submit question

{
  answer: string
  userId: string,
}

return 400/200 if the answer is correct, also return name of the part of the snowman

GET
Current question

{
  userId: boolean
}

return 400/200 if they have an active question. Return if they are complete all questions in the track, or all questions in the game.

{
   imageUrl: string,
   questionContent: string
}

Create concept of "Teams" in database

Users will need to be able to form teams for the event.

Constraints:

  • Teams can have a maximum size of 4 members (and only 3 member invites at a time)
  • A user can only be part of one team
  • Users must be able to join and leave teams.
  • Teams can be named
  • Team members should be invited to the team
  • Invites should be cancellable
  • A user can not remove another team member
  • All members of a team have the same level of privilege in managing the team.
  • Teams can not be explicitly deleted. They should only be deleted if all members have left the team.

Better Email Validation

The User entity needs better email validation. Class-validator probably offers this somewhere. If not, a custom validator can be built with some library or a regex.

Add "winner" indicator

Add a column to the submissions table that relates to the challenges to indicate that a submission has won that challenge.

Mailing

The API needs to have mailing support built in:

  • Endpoints for sending mail
  • Password reset hooked up with emailing
  • Email on registration?

Project submission images

Attendees should be able to add a "banner" image with their project submission (#12) that will be displayed on the submissions/judging pages.

We can either use a standard filename pattern to search for images to extract from the repo (e.g. banner.xyz) or extract images from within the repo README file.

Hacker Profiles

  • CRUD operations for Hacker Profiles on Users (e.g. socials, bio, etc...)

Socials

  • Filter and validate links?
  • Linkedin
  • GitHub / GitLab?
  • Personal Website
  • Figma / Dribbble / Behance
  • Twitter?
  • Email? (opted-in)

Other

  • Basic bio (280 character max)
  • List of interests?
  • Discord (separate from socials)
  • School
  • Name
  • Pronouns
  • Team

GitHub Integration

  • Users should be able to create an account with GitHub.
  • Users should be able to sign in with their GitHub account (and this should behave the same as username/password sign-in).
  • Users should be able to link their GitHub account with their cuHacking account after creation.

User Sign-in with Username/Password

  • The API needs endpoints for users to login with a username and password.
  • The existing Users implementation should be altered to hash passwords.
  • These accounts should also be used to authenticate the endpoints.

Dashboard Endpoints

GET:

  • Hackathon end time
  • User's details
  • Points
  • Teams
  • Announcements
  • Schedule (N latest)

Events

  • Basic CRUD
  • Get next n events
  • Users can favourite events

Limit max file upload size

Add server side validation of max file size for uploads. Allow this to be configurable via the .env file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.