Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Project structure #5

Open
rarmatei opened this issue Sep 3, 2017 · 0 comments
Open

Discussion: Project structure #5

rarmatei opened this issue Sep 3, 2017 · 0 comments

Comments

@rarmatei
Copy link
Owner

rarmatei commented Sep 3, 2017

Here is the project structure we discussed on Saturday, based on which I will be creating issues. This is a starting design, and once we get all the main features in, it can be refined.

Summary

Homepage will display all the topics along with their ratings.
Clicking on "Add topic" takes you to a separate, where you fill in the details for the new topic.
Clicking on "Edit page" takes you a page that looks similar to "Add topic", where the name of the topic is already present and cannot be changed, and some of the fields might be filled in.

Handlebars setup:

  1. Shared layout file, will contain the header. See below:

image

  1. The homepage index.hbs, will contain the below:

image

  1. Partial form.hbs

Because adding and editing share similar inputs (before class, after class, monday, wednesday, thursday, friday), these can be extracted away in a partial.

  1. add.hbs

Will contain the form for adding a new topic

  1. edit.hbs

Form for editing a topic

Routes

There should be a route for index, add and edit.

API

The app will have 3 API endpoints for dealing with topic requests:

  1. getTopics - will retrieve all topics in the database
  2. addTopic - will add a single topic to the database
  3. editTopic - will edit an already existing topic in the database

Please comment below for any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant