diff --git a/.env.example b/.env.example index f542c9b4..7923bee4 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ API_URL=http://localhost:8080 +SOCKETS_URL=ws://localhost:8080 REACT_APP_AUTH0_DOMAIN=dev-auth0domain-goes-here.us.auth0.com REACT_APP_AUTH0_CLIENT_ID=some-client-id-goes-here REACT_APP_AUTH0_AUDIENCE=https://dev-find-this-under-APIs-in-the-dashboard.us.auth0.com/api/v2/ diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..e69de29b diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..174a5cca --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "github.copilot" + ] +} \ No newline at end of file diff --git a/.vscode/style.css b/.vscode/style.css new file mode 100644 index 00000000..3d552a61 --- /dev/null +++ b/.vscode/style.css @@ -0,0 +1,2 @@ +@import "tailwindcss"; + diff --git a/CAPSTONE-I.md b/CAPSTONE-I.md deleted file mode 100644 index 5cf3ee12..00000000 --- a/CAPSTONE-I.md +++ /dev/null @@ -1,31 +0,0 @@ -# 📊 Capstone I: Working Together - -## Working with TAs - -Each group will have a TA assigned as your primary contact. Your assigned TA will meet with you daily, shortly after lunch. Keep them informed about how your project is going, what problems you're facing, and wins worth celebrating! Your assigned TA is not the only person you can reach out to for help, but they should be the first point of contact. - -## Pre-Coding Checklist - -You are NOT permitted to start writing code until the following tasks have been accomplished and verified by someone from the Instructional Team. Feel free to spend all day Thursday and Friday on these tasks. Preparation is important! You'll be given a pair of starting point repos once you're cleared for takeoff. - -1. Confirm that you are able to access the **cohort Discord** on campus WiFi (try https://ptb.discord.com/). -2. You've created a **GitHub Project Board** populated with issues to get started on the project. -3. You have a **database schema diagram** (we recommend https://dbdiagram.io). -4. You have a **UI diagram on [Figma](https://www.figma.com/)**. You don't need to have created all the UI views just yet, but at least one for now. -5. You have a **Team Norms Google Document** ([template here](https://docs.google.com/document/d/1kKkbEWmXAA6VJK5ZPmkyeqgySchUwpPvuWMVLuiYeSs/edit?usp=sharing)). You should have discussed questions such as: how do we review Pull Requests before they're merged? - -## Getting Started - -Once you've passed the Pre-Coding Checklist and you've been given the starting point repos, you'll want to do these things right away: - -1. Make sure everyone is a collaborator, able to push commits to the team repo. -2. Make sure everyone is able to run the project locally. No exceptions! If anyone on the team isn't able to run the project on their machines, fixing that is _everyone's_ top priority. -3. Deploy the application on Vercel. It'll be easier to deploy the starting point repos before you've added a lot of changes. - -## A Few Final Notes - -You may be tempted to focus on a particular part of the stack that you're most comfortable with. Don't! Everyone should have experience working with every part of the stack. In fact, you may find it easier to work on features "vertically" – build the necesssary backend and frontend functionality as part of the same PR. - -This project will require research and reading documentation. This is real work, and deserves time and recognition. Consider how you want to handle research tasks on the team. - -Keep in mind: the primary learning objective here is collaboration. Pay close attention to team communication habits. Reflect on the highs and the lows. When something doesn't seem to be working well, consider how best to bring it up in a constructive way. Emotional intelligence and social awareness are surprisingly important skills for software engineering. diff --git a/README.md b/README.md index 4604947a..c274e6de 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ -# Capstone I Frontend +# Capstone II Frontend This project uses React and React-Router to display a Single-Page App. -Please refer to the [Capstone I Project Requirements](./REQUIREMENTS.md), as well as the [Collaboration Guide](./CAPSTONE-I.md). - ## Getting Started -This app works best in conjunction with a Capstone I Backend. Go to that repo and get it up and running so that this Frontend has an API to request data from. +This app works best in conjunction with a Capstone II Backend. Go to that repo and get it up and running so that this Frontend has an API to request data from. With that done, run the following commands: diff --git a/REQUIREMENTS.md b/REQUIREMENTS.md deleted file mode 100644 index 53e8b67c..00000000 --- a/REQUIREMENTS.md +++ /dev/null @@ -1,85 +0,0 @@ -# 🗳️ Capstone I: Project Requirements - -## Learning Goals - -This project is designed to reinforce fullstack web development concepts we've learned so far, including React, React-Router, Network Requests, Express, Sequelize / PostgreSQL, Deployment, Authentication / Authorization, and more. - -You will also be working with a team over several weeks. This project is more ambitious than the CRUD app you built earlier, meaning you'll have to spend more time discussing the architecture of your application and how to prioritize and assign tasks. Collaboration is the _primary learning obective_ of this project. - -## Overview - -You'll be building a ranked choice poll app. Our market research tells us that users frequently want to poll their coworkers or friend groups to compare different options (e.g. where should we get catering from for our company retreat?). Simply asking people "what option do you like best?" doesn't actually capture their true preferences. Instead, we want users to be able to rank the available options, and a winner will be decided accordingly. Applications like Poll Everywhere, Typeform, and Google Forms are popular, but don't currently meet this need. - -Users should be able to create a poll, listing several options. Once they're satisfied, they can "publish" the poll, generating a link. Once published, the poll can no longer be modified. They can share the link and respondents can rank their options from first to last, according to their preferences. When the poll is closed, the results are tallied and displayed in a nice-looking bar chart. - -## Requirements - -### Basic - -- [x] User can log in & signup with an email and password -- [ ] User can log in & signup with an OAuth provider -- [ ] Users have first name, last name, email, and profile picture -- [ ] Users can view a list of polls they've created (draft, published, ended) -- [ ] The application is deployed - -### Poll Creation - -- [ ] User can create a new poll with a title and description -- [ ] User can toggle whether or not to allow unauthenticated users to vote -- [ ] User can add multiple poll options (minimum 2) -- [ ] User can edit poll details while in draft status -- [ ] User can delete poll options -- [ ] User can set poll end date/time - - (Optional: if no end date present, the poll must be manually closed) -- [ ] User can publish a poll (changes status from draft to published) -- [ ] Published polls cannot be modified -- [ ] User can duplicate an existing poll to create a new one -- [ ] User can delete a draft poll -- [ ] Optionally, the poll is only accessible to a predetermined list of users - -### Voting - -- [ ] Anyone with the poll link can access a published poll -- [ ] Voters can see poll title, description, and all options -- [ ] Voters can rank all options from 1st choice to last choice -- [ ] Voters cannot submit duplicate rankings -- [ ] Voters receive a warning message if they try to submit without ranking all choices, but they may submit regardless -- [ ] Authenticated voters can save their ballot for later submission -- [ ] Voters receive confirmation after successful submission -- [ ] Voters cannot vote multiple times on the same poll - - Unless the poll is open to unauthenticated users, in which case there's no way to prevent it -- [ ] Voters can see how many people have voted so far -- [ ] Voters can see the poll end date/time - -### Results - -- [ ] Once closed, the poll no longer accepts new ballot submissions. -- [ ] Results are only shown after poll end date/time -- [ ] Results show final rankings using ranked choice voting algorithm - - See this [Wikipedia article about Instant-Runoff Voting](https://en.wikipedia.org/wiki/Instant-runoff_voting) -- [ ] Results display in a bar chart format -- [ ] Results show vote distribution for each round of elimination -- [ ] Results show the winning option clearly highlighted -- [ ] Results show total number of votes cast -- [ ] Results show percentage breakdown of final votes -- [ ] Results are accessible to anyone with the poll link -- [ ] Results page shows poll title and description -- [ ] Users can view polls they've voted in previously -- [ ] Users who voted receive an email update with a link to the results - -### Admin Users - -- [ ] Admins can view a paginated list of users with a search bar to filter results -- [ ] Admins can disable a poll, preventing further edits or ballot submissinos -- [ ] Admins can disable a user account - -### Miscellaneous - -- [ ] The UI should be mobile-friendly -- [ ] User-friendly error messages -- [ ] Success notifications for key actions -- [ ] Forms display validation errors before submission -- [ ] Poll links are shareable via social media -- [ ] Poll links can be copied to clipboard -- [ ] Polls have various "share on social media" buttons -- [ ] Search and filter functionality for user's poll list diff --git a/dist/favicon.ico b/dist/favicon.ico deleted file mode 100644 index f63c4b5f..00000000 Binary files a/dist/favicon.ico and /dev/null differ diff --git a/dist/index.html b/dist/index.html index e864e00a..28a3eddd 100644 --- a/dist/index.html +++ b/dist/index.html @@ -3,11 +3,18 @@
- -