Skip to content

Sprint 1 + 2#8

Open
tgillysuit wants to merge 126 commits into
kellerflint:mainfrom
tgillysuit:main
Open

Sprint 1 + 2#8
tgillysuit wants to merge 126 commits into
kellerflint:mainfrom
tgillysuit:main

Conversation

@tgillysuit

Copy link
Copy Markdown
  • 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.

tgillysuit and others added 30 commits September 25, 2025 11:08
…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.
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.
…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.
…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.

@rifflere rifflere left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of MVC model!

Comment thread README.md

#### Group B (Tyler & Raymond)

### Overall Goals

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpful goal checklist!

Comment thread server/server.js
.catch(err => console.error('Error syncing database:', err));

app.use('/api', apiRouter);
app.use('/', loginRouter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the default route a login? (No landing page)

Comment thread server/server.js
app.use('/', loginRouter);

// Health check
app.get("/api/health", (req, res) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this (and other get requests off of /api below) should be inside the apiRouter router

Comment thread server/server.js
import axios from 'axios';
import sequelize from './database/connect.js'
import apiRouter from './routers/Router.js';
import loginRouter from './routers/UserRouter.js';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of middleware

@LauraV-702 LauraV-702 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is MUI import or installed? :O

<div>
<h2>User Access Denied</h2>
<p>You do not have permission to view this page.</p>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good security! - Diana

email: data.user.email
});

// Store in localStorage for persistence

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarification, does this store and keep the user info permanently?

@AugleBoBaugles AugleBoBaugles left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation is well done!

Comment thread server/server.js
allowedHeaders: ['Content-Type', 'Authorization']
}));

// Middleware: log requests

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful comments!

Comment thread server/server.js
app.use('/', loginRouter);

// Health check
app.get("/api/health", (req, res) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a controller.

Comment thread server/server.js
const characterInfo = new Set(['races', 'classes', 'backgrounds', 'monsters', 'spells', 'magicitems', 'weapons', 'armor']);

// Open5e API proxy endpoints
app.get("/api/dnd/:reference", async (req, res) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to be broken down into routers and controllers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

RMarx1456 and others added 7 commits October 18, 2025 10:18
…ing next/navigation for the navbar unless there's a better solution.
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).
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

Successfully merging this pull request may close these issues.

5 participants