Starting the Invoice App
To start the invoice App in the Codespaces/Github environment
To start the server:
https://reimagined-space-disco-979xw4x695gj3x4xx.github.dev/
python main.py
To start the React Frontend:
cd client-app
python main.py
To Commit and Push to Render
In a new terminal do the following:
-
git add requirements.txt
-
git commit -m "fix requirements for render"
-
git push
To Test Changes in the development environment
To test new versions/changes locally, you must ensure your App is talking to your local computer, not the live Render server.
Here is the 3-step checklist to run a local test:
-
Check your
App.jsxConnection
Since we recently pointed your App to the live Render server, you likely need to point it back to "Local" for testing.
-
Open
client-app/src/App.jsx. -
Find the
const API_URL = ...line. -
If it says:
https://su580.onrender.com-> Change it back to your local Codespaces URL (e.g.,https://reimagined-space-disco...5173.app.github.devorhttp://localhost:10000). -
Tip: You can just comment out the live one and uncomment the local one so you can switch back and forth easily.
2. Start the Local Backend
Your local main.py won't run automatically like Render does. You need to start it manually to test the new AI code.
-
Open your Terminal in Codespaces.
-
Make sure you are in the root folder (where
main.pyis). -
Run this command:
Bashpython main.py -
Watch the logs: You should see
🤖 Loading AI Model: gemini-1.5-flash. If you see this, you know your local test is using the stable model!
3. Test the "Get Sorted" or Upload
-
Open your Development App (the one running on port 5173).
-
Try uploading a receipt.
-
Watch the Terminal: You will see the logs scroll by in real-time (e.g.,
✅ File read successfully,✅ AI Extraction Successful).
If it works locally:
-
Go back to
App.jsxand switch the URL back tohttps://su580.onrender.com. -
Commit and Push everything to GitHub.
-
Rest easy knowing it will work perfectly on Render.