Skip to content

Conversation

@V01D-NULL
Copy link

I'm thinking it would be best to use a hardened framework for the frontend portion of this application, specifically NextJS.
End goal is to fully migrate your frontend to next js and make python purely API focused.

This PR includes a ported home page (/) and interoperability between the flask and next js application.

My deployment strategy would be to simply use vercel to host next js, and keep whatever you guys had for the rest of the app.

I setup a working example here
Please note that, since I don't have access to your staging servers, I am running the python portion locally and exposing it through ngrok.

Should something break when you try it, it may have just been killed by me or my computer.

Copy link
Collaborator

@Mr-Oregano Mr-Oregano left a comment

Choose a reason for hiding this comment

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

Still haven't tested the branch yet, just left some minor comments for this for now.

<!-- <a class="logo-text" href="http://localhost:3000/">Computer Science Learning Center</a> -->

<!-- Prod -->
<a class="logo-text" href="https://uno-cslc-ticket-portal.vercel.app/">Computer Science Learning Center</a>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be a relative path?

Copy link
Author

Choose a reason for hiding this comment

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

wdym

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the link should be for the index page. I didn't know if this was for testing or not. Could it just be /?

Copy link
Author

@V01D-NULL V01D-NULL May 20, 2023

Choose a reason for hiding this comment

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

no it can't be / because I ported the home page.
The home page lives on vercel. It's completely detached from the flask service right now which allows both to co-exist.

Since we still have other pages in flask that have not yet been ported, I can't link back to / because that'd be the flask app.

Locally the NextJS frontend runs on port 3000

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you merge this with the main .gitignore and delete this one?

Copy link
Author

@V01D-NULL V01D-NULL May 20, 2023

Choose a reason for hiding this comment

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

The goal is to have different services (front and backend)
Do you really want to make this a monolithic repository?

I figured it could be split up into a separate repo and included as a submodule if you really need the front end in here.

That's something we can do once the migration is complete

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure we could try to do that

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have .editorconfig, might not need this.

Copy link
Author

Choose a reason for hiding this comment

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

didn't know about that.

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.

2 participants