I have a project I need to finish. The app is for animal adoption. My struggle is that I have to store user information and animal information in json files, and then use model files for table creation and establishing relationships. Then I have to use service files with sequelize.query() functions to import the data to the mysql database.
I have the front end ready, but the rest is pretty much empty.. Any chance someone can complete this project for me?
A different solution is in this repo: https://github.com/brittanyBN/DatabasePractice
Instead of the datainsert and database queries I need to complete this within the application.
Lots of things… Nothing is working for me.
Tasks 1: -TABLE CREATION- Using Sequelize only: Create all the necessary tables in the 3rd normal form (Including all relationships) from within the application: (Remember – the application should keep track of adoptions) One animal can have many temperaments. Many animals can have the same temperaments. An animal can only be one species and one size. A user can only have one role – either ‘admin’ or ‘member’. Each animal can only be adopted once. A single logged-in user of the ‘member’ role can adopt many animals.
Task 2: -DATABASE POPULATION- Read data from JSON: In the /public/json folder, create JSON files containing the population queries for each database table (One .json file per table) – This data can be found below in the tables. Create Service files that use the JSON files to populate the database with the sequelize.query() function. Make sure the database conforms to 3rd normal form. HINT: E.g., the example.json file would contain the query required to populate the Example table: { id:1, query: “INSERT INTO TABLE VALUES…” }
Task 3: -AUTHENTICATION- The ‘users’ table should have the username and password for users that have signed-up for this service. Make sure to: Implement the sign-up feature in the application/back-end PassportJS must be implemented to authenticate logged-in users, from the ‘users’ table. (Hashing of passwords is not required)
Task 4: -ANIMAL ADOPTION- All these routes must be created in the animals.js route file. POST handlers should be used for data creation, updates, and additions, while GET handlers should be used to display a view. Creation, deletion, and update operations must be authenticated. Non-logged-in users (guest users) should not be able to adopt any animal.
Task 5: -SPECIES- All these routes must be created in the species.js route file. All the endpoints need to be POST handlers, NOT GET. CRUD operations must be authenticated. Only users of the ‘admin’ role should be able to modify/add species data. A user with the ‘admin’ role can add a new species or update existing species’ names. A species cannot be deleted if there are any dependencies on that record in the database (e.g.: “Parrot” species cannot be deleted if there is an animal of species, “Parrot”).
Show 1 more comment