Search
Code1,445
This backend HTTP server is responsible for serving all static assets to the browser to render the app, including HTML, JavaScript (including all client-side React), CSS, and even the favicon SVG.In a normal server environment, you would likely use a middleware [like this one](https://hono.dev/docs/getting-started/nodejs#serve-static-files) to serve static files. Some frameworks or deployment platforms automatically make any content inside a `public/` folder public. We *bootstrap* `index.html` with some initial data from the server, so that it gets dynamically injected JSON data without having to make another round-trip request to the server to get that data on the frontend. This is a common pattern for client-side rendered apps.This app has two CRUD API routes: for reading and inserting into the messages table. They both speak JSON, which is standard. They import their functions from `/backend/database/queries.ts`. These routes are called from the React app to refresh and update data.This template is a classic client-side-only React app. This HTML file has a `<div id="root"></div>`, which is where we mount the React app.This HTML file imports `/frontend/index.tsx` from `/public/index.tsx`, which is the **entrypoint** for all frontend JavaScript, including all the React. It is not a problem that it imports a file with a `.tsx` extension becaues browsers ignore file extensions. They only pay attention to content-types, which is great, because all these files will be returned as transpiled JS with the appropriate JS content type by [stevekrouse/utils/serve-public](https://www.val.town/x/stevekrouse/utils/branch/main/code/serve-public/README.md).)This file is the **entrypoint** for frontend JavaScript. It imports the React app from `/frontend/components/App.tsx` and mounts it on `<div id="root"></div>`.This directory is where the React components are stored. They're pretty standard client-side React components.# React Hono Val Town Project Starter TemplateThe entrypoint of this app is `backend/index.ts`, which is the Hono HTTP server, which serves the HTML, CSS, and JS, which run client-side.- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!- [x] Get React Router working on the client & move off localstorage for storing page state- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)- [ ] opentownie as a pr bot- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them- [ ] do a browser use or screenshot thing to give it access to its own visual output- [x] Refactor /backend/index.ts into multiple files- [x] Format the JSON inside the tool-calls as pretty markdown - [x] Think as normal markdown- [x] Show reasoning in a detail- [x] Consider asking it to write the minimum code possible- [x] Add caching (post in the vercel ai discussion about how it's not working)Vals
No vals found
Users
No users found