Skip to content

Discussion: Project structure #5

@rarmatei

Description

@rarmatei

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions