Sprint 1 + 2#8
Conversation
tgillysuit
commented
Oct 16, 2025
- Set up the backend server with Node.js and Express locally and on the VM.
- Design and implement the database schema for MySQL.
- Create RESTful API endpoints for basic CRUD operations.
- Set up the React frontend using the Next.js framework with a basic layout and navigation.
…tattribute to help with potential diffs when adding and pushing to this repo.
…off for the server. Trying to go back through notes to understand building a server again along with the database. There is a .env.example file, the next dev will need to create their own .env file. Feel free to add more creds to the example file.
…the database tables. A model for the schema to be created.'
…ontrollers. Want to get the routers and controllers done next.
…v gave us. Installed a few packages inside of the server folder, make sure to cd into that folder and do an npm i.
…uing to make some changes on my laptop.
We want to setup a basic user/login system first, as further development (characters, roles) are entailed by that functionality. Our next work will consist of building controllers and routers used for login functionality, and a front-end for easy accessibility. Also to note, I would rather have login success/failure returned in a constant time.
…he server to the database.
…he server to the database.
…ct changes, added my own .env. DB is running on my end. Controller, model, db, and routers should be worked on ASAP!
…to some issues trying to setup the db on my main machine, but my laptop was working fine. I ended up figuring out what was going on and fixed the problem.
…e components where its a login form and registration form, as well as a parent component to handle the logic when a user selects register the registration form would pop up, but running into an error to why that state isn't working. Passing this off to Raymond for him to debug.
…and backend integration is needed now.
…is not assumed and the password does not end up in the query parameters. We need to get the backend interaction completed, and then style afterwards.
Usage is "depdencies.sh" in CL, where CWD is DnD-Character-Sheet
Will need to start getting server and FE up and running ASAP!
…) to Page() in app/page.js, and removed the unecessary package-lock.json in the wrong area.
… This is working on update and delete functionality.
Added next steps for project development and improvements.
Pull User Up Del branch into main
|
|
||
| #### Group B (Tyler & Raymond) | ||
|
|
||
| ### Overall Goals |
| .catch(err => console.error('Error syncing database:', err)); | ||
|
|
||
| app.use('/api', apiRouter); | ||
| app.use('/', loginRouter); |
There was a problem hiding this comment.
Is the default route a login? (No landing page)
| app.use('/', loginRouter); | ||
|
|
||
| // Health check | ||
| app.get("/api/health", (req, res) => { |
There was a problem hiding this comment.
I think this (and other get requests off of /api below) should be inside the apiRouter router
| import axios from 'axios'; | ||
| import sequelize from './database/connect.js' | ||
| import apiRouter from './routers/Router.js'; | ||
| import loginRouter from './routers/UserRouter.js'; |
LauraV-702
left a comment
There was a problem hiding this comment.
Overall good stuff, but many files are separated and can be confusing to understand.
| return <Access />; | ||
| } | ||
|
|
||
| // TODO: Add some MUI Components down here to style it up. |
| <div> | ||
| <h2>User Access Denied</h2> | ||
| <p>You do not have permission to view this page.</p> | ||
| </div> |
| email: data.user.email | ||
| }); | ||
|
|
||
| // Store in localStorage for persistence |
There was a problem hiding this comment.
For clarification, does this store and keep the user info permanently?
AugleBoBaugles
left a comment
There was a problem hiding this comment.
Documentation is well done!
| allowedHeaders: ['Content-Type', 'Authorization'] | ||
| })); | ||
|
|
||
| // Middleware: log requests |
There was a problem hiding this comment.
Very helpful comments!
| app.use('/', loginRouter); | ||
|
|
||
| // Health check | ||
| app.get("/api/health", (req, res) => { |
There was a problem hiding this comment.
This should be in a controller.
| const characterInfo = new Set(['races', 'classes', 'backgrounds', 'monsters', 'spells', 'magicitems', 'weapons', 'armor']); | ||
|
|
||
| // Open5e API proxy endpoints | ||
| app.get("/api/dnd/:reference", async (req, res) => { |
There was a problem hiding this comment.
This also needs to be broken down into routers and controllers.
There was a problem hiding this comment.
I like that this is broken down to just user actions. I assume there will also be EventController and LocationController. The naming conventions for the files are not clear to me though.
…ing next/navigation for the navbar unless there's a better solution.
…ing a homepage link.
…d.id" instead of just one id reference.
Merge branch fix into main.
A lot of the fixes made for this to happen were bandaid fixes and the localstorage object for the user itself is quote strange, as user details are encapsulated within the 1st level id field, as well as having the same info repeated in the first level as well.
Implemented update (Allowing the user to update their email).