198```
199โโโ backend/
200โ โโโ database/
201โ โ โโโ migrations.ts # Schema definitions
202โ โ โโโ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering
198```
199โโโ backend/
200โ โโโ database/
201โ โ โโโ migrations.ts # Schema definitions
202โ โ โโโ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering
12- [ ] make it one click to branch off like old jp townie demos
13- [ ] opentownie as a pr bot
14- [ ] 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
15- [ ] do a browser use or screenshot thing to give it access to its own visual output
16- [ ] Have it default to creating a new branch off main
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),
192```
193โโโ backend/
194โ โโโ database/
195โ โ โโโ migrations.ts # Schema definitions
196โ โ โโโ queries.ts # DB query functions
251 ```
252
253### Database Patterns
254- Run migrations on startup or comment out for performance
255- Change table names when modifying schemas rather than altering
12- [ ] make it one click to branch off like old jp townie demos
13- [ ] opentownie as a pr bot
14- [ ] 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
15- [ ] do a browser use or screenshot thing to give it access to its own visual output
16- [ ] Have it default to creating a new branch off main
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),
192```
193โโโ backend/
194โ โโโ database/
195โ โ โโโ migrations.ts # Schema definitions
196โ โ โโโ queries.ts # DB query functions
251 ```
252
253### Database Patterns
254- Run migrations on startup or comment out for performance
255- Change table names when modifying schemas rather than altering
2import stripe, { Stripe } from "stripe";
3import Preorder from "../../../../models/Preorder";
4import mongoConnect from "../../../../../database";
5import MongoItem from "../../../../models/Item";
6
1import mongooseConnect from "../../../../database"
2import MongoItem from "../../../models/Item";
3import Body from "./Body";