Geek-Collectors-Network / geek-collectors-network

0 stars 2 forks source link

Connect frontend to backend #156

Closed FoRVaiS closed 8 months ago

FoRVaiS commented 8 months ago

Description

Whheww! This is a big PR...

Docker

Backend

Frontend

Retrospective

CORs is a pain in the butt because cookies from the api can not be saved to the browser.

express-session is not a good solution for client-side rendered frontends.

Testing Notes

The commands in the Makefile were not designed for interdependence between apps. This means that we'll need to manually run some commands that we would not have before.

This will be solved with the new project management script (not yet uploaded).

Testing

  1. Build the latest frontend: npm run -w apps/frontend build
  2. Spin up the db: make res
  3. Add WEB_ROOT=../frontend/dist to apps/api/.env
  4. Start the api server: npm run -w apps/api start:dev
  5. Navigate to: http://127.0.0.1:3000/
  6. Register for a new account
  7. Login with your new account
  8. Verify you can see your profile information: http://127.0.0.1:3000/profile/edit
  9. Verify you can see your account information: http://127.0.0.1:3000/account
  10. In the account information page, edit your first name, then save
  11. Refresh the page, verify your change persists
netlify[bot] commented 8 months ago

Deploy Preview for geek-collectors-network ready!

Name Link
Latest commit dbb1f35019e517a850a4d72c9f4ec26669f6f3a5
Latest deploy log https://app.netlify.com/sites/geek-collectors-network/deploys/65fc07cf800adf0008ffcd99
Deploy Preview https://deploy-preview-156--geek-collectors-network.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

FoRVaiS commented 8 months ago

Hours worked: 5:15

tgrigoruk commented 8 months ago

There are some bugs with form submissions. Account info only saves if a password is entered, and I can't get the profile page to save at all.

Everything else looks good so I'm approving this PR with the assumption that as User Profile continues development those issue will get ironed out.