The backend was working. The 𝐀𝐏𝐈𝐬 were tested. But it was still just 𝐉𝐒𝐎𝐍 𝐫𝐞𝐬𝐩𝐨𝐧𝐬𝐞𝐬 in a terminal. So I built the 𝐟𝐫𝐨𝐧𝐭𝐞𝐧𝐝. 𝐇𝐓𝐌𝐋, 𝐂𝐒𝐒, 𝐚𝐧𝐝 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭 — served directly by FastAPI — connected to every endpoint I'd built: browse products, add to cart, place an order, make a payment. The whole thing now runs locally as one unified app. No React. No separate frontend server. FastAPI mounts the static files and serves the HTML pages directly — which meant I could 𝐬𝐞𝐞 𝐞𝐯𝐞𝐫𝐲 𝐀𝐏𝐈 𝐜𝐚𝐥𝐥 hit my routes in real time while clicking through the UI. What made this click: → The 𝐚𝐮𝐭𝐡 flow actually works end-to-end — login returns a 𝐉𝐖𝐓, the frontend stores it, and protected routes enforce it. → The 𝐩𝐫𝐨𝐝𝐮𝐜𝐭 𝐬𝐞𝐚𝐫𝐜𝐡 𝐟𝐢𝐥𝐭𝐞𝐫𝐬 (price range, keyword) respond instantly. → The cart persists correctly across page navigations. → The 𝐚𝐝𝐦𝐢𝐧 𝐩𝐚𝐧𝐞𝐥 is only accessible after role validation. As an AI student, I usually live in notebooks and model files. Building a UI from scratch that talks to a backend, felt different. It made the whole system feel real in a way that Postman tests don't. 𝐍𝐞𝐱𝐭 𝐬𝐭𝐞𝐩: converting the project into a 𝐋𝐚𝐧𝐠𝐆𝐫𝐚𝐩𝐡 𝐂𝐋𝐈 and Automated 𝐀𝐠𝐞𝐧𝐭 deployment. What's your go-to stack when you need a quick frontend for an AI project — plain HTML, Streamlit, or something else? #FastAPI #WebDevelopment #Python #FullStack #BuildInPublic

To view or add a comment, sign in

Explore content categories