Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .glitch-assets
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{"name":"drag-in-files.svg","date":"2016-10-22T16:17:49.954Z","url":"https://cdn.hyperdev.com/drag-in-files.svg","type":"image/svg","size":7646,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/drag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(102, 153, 205)","uuid":"adSBq97hhhpFNUna"}
{"name":"click-me.svg","date":"2016-10-23T16:17:49.954Z","url":"https://cdn.hyperdev.com/click-me.svg","type":"image/svg","size":7116,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/click-me.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(243, 185, 186)","uuid":"adSBq97hhhpFNUnb"}
{"name":"paste-me.svg","date":"2016-10-24T16:17:49.954Z","url":"https://cdn.hyperdev.com/paste-me.svg","type":"image/svg","size":7242,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/paste-me.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(42, 179, 185)","uuid":"adSBq97hhhpFNUnc"}
{"uuid":"adSBq97hhhpFNUna","deleted":true}
{"name":"fb523511-7441-4845-ba25-0640e4c07ff6.image.png","date":"2019-10-08T22:58:08.184Z","url":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Ffb523511-7441-4845-ba25-0640e4c07ff6.image.png","type":"image/png","size":53603,"imageWidth":913,"imageHeight":512,"thumbnail":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fthumbnails%2Ffb523511-7441-4845-ba25-0640e4c07ff6.image.png","thumbnailWidth":330,"thumbnailHeight":186,"uuid":"9geI1akhPH6rW8Pp"}
{"uuid":"9geI1akhPH6rW8Pp","deleted":true}
{"name":"checkmark.png","date":"2019-10-09T00:40:13.769Z","url":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fcheckmark.png","type":"image/png","size":116929,"imageWidth":1782,"imageHeight":1674,"thumbnail":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fthumbnails%2Fcheckmark.png","thumbnailWidth":330,"thumbnailHeight":310,"uuid":"hcN8nO8xG0PTL0G3"}
{"name":"check.jpg","date":"2019-10-09T00:57:39.541Z","url":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fcheck.jpg","type":"image/jpeg","size":37918,"imageWidth":512,"imageHeight":512,"thumbnail":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fthumbnails%2Fcheck.jpg","thumbnailWidth":330,"thumbnailHeight":330,"uuid":"vszt5Pf1ZPz1dvMQ"}
{"uuid":"vszt5Pf1ZPz1dvMQ","deleted":true}
{"uuid":"hcN8nO8xG0PTL0G3","deleted":true}
{"name":"check.jpg","date":"2019-10-09T01:00:04.816Z","url":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fcheck.jpg","type":"image/jpeg","size":25882,"imageWidth":512,"imageHeight":512,"thumbnail":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fthumbnails%2Fcheck.jpg","thumbnailWidth":330,"thumbnailHeight":330,"uuid":"zcR44K0V3CQNyZxW"}
{"name":"checkmark.png","date":"2019-10-09T01:05:37.096Z","url":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fcheckmark.png","type":"image/png","size":12402,"imageWidth":225,"imageHeight":225,"thumbnail":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fcheckmark.png","thumbnailWidth":225,"thumbnailHeight":225,"uuid":"PugkQrvTR1H9mzYH"}
{"uuid":"zcR44K0V3CQNyZxW","deleted":true}
{"name":"uparrow.png","date":"2019-10-09T01:24:09.451Z","url":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fuparrow.png","type":"image/png","size":32551,"imageWidth":600,"imageHeight":600,"thumbnail":"https://cdn.glitch.com/33f61a64-3dc4-418d-b67f-1456d58e0a6f%2Fthumbnails%2Fuparrow.png","thumbnailWidth":330,"thumbnailHeight":330,"uuid":"ljjbdGJ1oZ5VMpeF"}
139 changes: 79 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,79 @@
# cs4241-FinalProject

For your final project, you'll implement a course project that exhibits your mastery of the course materials.
Similar to A4, this project gives you an opportunity to be creative and to pursue individual research and learning.

## General description

Your project should consist of a complete Web application, exhibiting facets of the three main sections of the course material:

- Static Web page content and design. You should have a project that is accessible, easily navigable, and features significant content.
- Dynamic behavior implemented with JavaScript.
- Server-side programming *using Node.js*. Typically this will take the form of some sort of persistent data, authentication, and possibly server-side computation.

Additionally, you should incorporate features that you independently research, design, and implement for your project.

## Project ideation

Excellent projects serve someone/some group; for this assignment you need to define your users and stakeholders. I encourage you to identify projects that will have impact, either artistically, politically, or in terms of productivity. Consider creating something useful for a cause or hobby you care about.

## Logistics

### Team size
Students are encouraged to work in teams of 2-5 students for the project. This will allow you to build a good project without expending an excessive amount of effort. While I would expect a team of four or five students to produce a project with more features, I expect a every team's work to exhibit all of the required facets described above.

### Deliverables

__Proposal:__
Provide an outline of your project direction and the names of the team members.
The outline should have enough detail so that staff can determine if it meets the minimum expectations, or if it goes too far to be reasonable by the deadline.
This file must be named proposal.md so we can find it.
Submit a PR to turn it in by Monday, September 30th, before class

There are no other scheduled checkpoints for your project.
You must be done in time to present before the final project demo day (October 10th).

#### Turning in Your Outline / Project

**NOTE: code is due before the project presentation day due to the end of term / grading schedule constraints**
Submit a second PR on the final project repo to turn in your app and code.

Deploy your app, in the form of a webpage, to Glitch/Heroku/Digital Ocean or some other service.
Folks on the same team do not need to post the same webpage, but must instead clearly state who is on the team in their proposal.

The README for your second pull request doesn’t need to be a formal report, but it should contain:

1. A brief description of what you created, and a link to the project itself.
2. Any additional instructions that might be needed to fully use your project (login information etc.)
3. An outline of the technologies you used and how you used them.
4. What challenges you faced in completing the project.
5. What each group member was responsible for designing / developing.

Think of 1,3, and 4 in particular in a similar vein to the design / tech achievements for A1—A4… make a case for why what you did was challenging and why your implementation deserves a grade of 100%.

## Final Presentation

Presentations will occur during the final day of class in *Riley Commons*.

## FAQs

- **Can I use XYZ framework?** You can use any web-based frameworks or tools available, but for your server programming you need to use node.js.
<h1>Ask It!</h1>
<p>
Made by: <strong>Javier Marcos, Rafael Pimentel, Daniel Caffrey and Paris Lopez</strong>
</p>
<p>
<em>https://cs4241final.glitch.me/</em>
</p>

<p>
This is an application that allows a user to become the host of a room. Attendants who join this room can then anonymously
ask questions to the host, as well as vote on questions other attendants have posted. The host can then look at
these questions and delete them from the list as they are resolved. The questions are sorted by number of upvotes.
The list regularly and automatically refreshes to add newly asked questions and update the upvotes on existing questions.
</p>

<p>
To use this program, hosts and attendees alike must first create an account. Then they may enter their credentials to log in.
The slider below allows users to toggle whether they wish to log in as a host or as an attendee.
</p>
<p>
When a host logs in, the server will automatically provide and display a unique code for that room. Attendees may then enter this code
to join the room, enabling them to post questions to be displayed on the host's screen. Hosts are encouraged to show their display to their
attendees, which will display incoming questions.
</p>
<p>
Attendees can upvote any questions posted to their room. Questions will then be regularly and automatically sorted according to the number of
votes. This allows for important questions that attendees are most interested in to be rise to the top of the list, and ideally, be resolved first.
</p>

<h2>Challenges</h2>
<p>
Working in a group proved to be a challenge at some points since we had to constantly ensure that team members were not working over each other.
This was especially true when one person tried to test the server while the other made changes. Some members had also adopted
packages and practices unfamiliar to the rest of the team, so each member had to also adapt to each other's practices. Additionally,
our schedules did not match up well, so having meetings was slightly difficult.
</p>

<h2>Ideas</h2>
<p>
Due to time constraints, there where several features that we thought of adding but didn't have the chance to do so.
We thought of making a question counter, as well as a button that is able to clear all questions to provide hosts with several tools to work with.
</p>
<p>
The program currently allows users to upvote the same question multiple times; to fix this we considered having questions track which users
have already upvoted them so that the server could then block subsequent upvotes.
</p>
<p>
Finally, we had planned to allow the hosts and attendees to flag disruptive questions, as well as a feature that allows hosts to
kick or ban undesired attendees from their room.
</p>

<h2> Contributions </h2>
<ol>
<ul>
<li>Javier Marcos</li>
<ul>
<li>Debugging</li>
<li>Readme</li>
<li>Minor coding</li>
</ul>
<li>Rafael Pimentel</li>
<ul>
<li>Passport</li>
<li>Mongoose and MongoDB admin</li>
<li>Client and Server side Coding</li>
</ul>
<li>Daniel Caffrey</li>
<ul>
<li>Server Side Coding</li>
<li>Assisting in Debugging</li>
</ul>
<li>Paris Lopez</li>
<ul>
<li>HTML files</li>
<li>CSS</li>
<li>Client-side errors</li>
</ul>
</ul>
</ol>
15 changes: 15 additions & 0 deletions auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
ensureAuthenticated: function(req, res, next) {
if (req.isAuthenticated()) {
return next();
}
req.flash('error_msg', 'Please log in to view that resource');
res.redirect('/users/login');
},
forwardAuthenticated: function(req, res, next) {
if (!req.isAuthenticated()) {
return next();
}
res.redirect('/dashboard');
}
};
Loading