Skip to content

hswolff/votey-uppy

Repository files navigation

votey-uppy

Check out the live working version!

Votey-uppy is an app to collect and vote on ideas.

The code is being developed in the open so follow along with the progress here!

Development

  1. Checkout the repo
  2. yarn to install node dependencies
  3. Start a MongoDB server
  4. Create your local environment file:
    1. cp .env.template .env.local
    2. Create a GitHub OAuth application
      1. Homepage URL: http://localhost:3000/
      2. Authorization callback URL: http://localhost:3000/api/auth/callback/github
    3. Fill in your GitHub ID and secret into your local environment file
  5. yarn dev to start the Next.js

Make a user an admin

votey-uppy has a very basic role based system. There's only two roles: no role and admin.

To make a user an admin you need to run the following MongoDB queries:

# Connect to voteyUppy database
mongo voteyUppy

# Find the ObjectId of the user
db.users.find({ username: 'USERNAME_HERE' });

# Set the user's role
db.users.updateOne({_id: ObjectId("OBJECT_ID_HERE")}, { $set: { role: 'admin' }})

# (Optional) Remove the user's role
db.users.updateOne({_id: ObjectId("OBJECT_ID_HERE")}, { $unset: { role: '' }})

Roadmap

Milestone 1

Milestone 2

  • Pull username from GitHub when user signs in
  • Make all forms of AddItemForm configurable
    • title, description, category
    • By default status is set to pending
  • Allow admin to view pending ideas
    • Create admin flag on User
    • Don't show pending in main feed
  • Create standalone Item page
  • Allow Admins to edit an existing Item
    • Able to promote pending items to open

Milestone 3

  • Revise Item design
  • Switch to Formik
  • Revise Add new Item form
  • Revise Edit Item Form
  • Revise Profile design
  • Revise About design
  • Add docs on Add New Item page telling users it's been added to the queue and will be evaluated before being accepted
  • Show pending items on user's profile page

Milestone 4

  • Let user edit their own Item while it's still 'pending'
  • Show the username of who created the Item in the item UI
  • Filter items by:
    • status
    • category
  • Make homepage sortable in asc/desc order by:
    • Votes
    • Created
  • Remove Admin page and replace with Pending support for admins on home page
  • Make description field take in Markdown and render as markdown
  • True mobile support
  • Upvoting on individual item page doesn't update count
  • Save the date of when an item moves status
    • Such that you can see when an item was submitted and when it was completed
  • Cleanup user._id and user.id usage

Milestone 5

  • Let admins set status when creating a new item
  • Let admin delete an item
  • Add pagination to list of Items
  • Support export to json functionality
  • Maybe support priority order of items within a list
  • Let user edit their profile details
    • Can change their username
    • Make sure their username change reflects in Item
  • Migrate to Typegoose