Skip to content

Conversation

@parcheesime
Copy link
Member

Description

This PR adds a temporary FastAPI proxy to support development while the data
pipeline is still in progress.

  • /citations returns parking citation data from either a static mock file or the
    live LA Open Data API.
  • /ping confirms mode status and checks if the live API is reachable.
  • Toggle mode using the .env file via USE_STATIC_DATA=true/false.

Includes a README.md with setup and usage instructions.


Related Issues

Closes #640


Testing

  • Tested locally by switching .env between true/false
  • Verified both endpoints (/citations, /ping) respond correctly
  • Mock JSON matches production schema for accurate frontend integration

@netlify
Copy link

netlify bot commented Apr 19, 2025

Deploy Preview for luckyparking failed.

Name Link
🔨 Latest commit 737023b
🔍 Latest deploy log https://app.netlify.com/sites/luckyparking/deploys/6804060481a23f00086b91be

Copy link
Member

@glenflorendo glenflorendo left a comment

Choose a reason for hiding this comment

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

@parcheesime I like the direction, but this can be implemented without creating a separate backend in a different tech stack.

Also, this (and other) PRs should wait to be merged until we get the build system changes in. Since I can't actively work on this regularly, this would hopefully help @bltomlin and other new developers ease into the codebase more smoothly.

@@ -0,0 +1,59 @@
[
Copy link
Member

Choose a reason for hiding this comment

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

This is a neat idea. We should figure out how big (how many records) we want this to have. It should be a big enough sample of data.

@@ -0,0 +1,48 @@
# Issue #640 ('https://github.com/hackforla/lucky-parking/issues/640')

This FastAPI app allows Lucky Parking developers to TEST features while the main data pipeline is under construction.
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious why a different tech stack and a different server?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to clarify — this proxy is meant to be strictly temporary and for local development/testing only, especially to unblock development while the main data pipeline is in progress.

It’s not intended to be deployed nor to become part of the final architecture. Once the data pipeline is ready, this should be removed or replaced.

Copy link
Member Author

Choose a reason for hiding this comment

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

Re: mock data — also note that the static JSON is intentionally small and controlled
right now to support lightweight map tests and local builds.

I'm happy to adjust anything needed to move things forward — just let me know what you prefer. Thanks, Glenn!

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm curious why a different tech stack and a different server?

I’m happy to rewrite this to match the existing stack.

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.

[Backend] Query data from source API

2 participants