Skip to content

Commit fa346c3

Browse files
author
zbeyens
committed
doc
1 parent 692a285 commit fa346c3

File tree

9 files changed

+582
-7
lines changed

9 files changed

+582
-7
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 1.1.0
4+
5+
- New folder [session](session):
6+
- [start-session](session/start-session.md)
7+
- [end-session](session/end-session.md)
8+
- New folder [blueprints](blueprints):
9+
- [supabase-drizzle-actions](blueprints/supabase-drizzle-actions.md) by @mckaywrigley
10+
- [flux-with-replicate](blueprints/flux-with-replicate.md) by @mckaywrigley
11+
- New folder [plugins](plugins):
12+
- [v0](plugins/v0.md) by @mckaywrigley
13+
- New folder [lib](lib):
14+
- [nuqs](lib/nuqs.md) example for library usage
15+
316
417

5-
- Initial codex
18+
- New folder [codex](codex):
19+
- [codex.md](codex/codex.md)
20+
- [learn.md](codex/learn.md)
21+
- [split-codex.md](codex/split-codex.md)

README.md

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,68 @@ This folder contains AI-assisted development tools for improving code quality an
1212

1313
### Files
1414

15-
- `codex.md`: AI Codex - A repository of learnings and errors.
16-
- `learn.md`: AI Learn - Protocol for updating the AI Codex.
15+
- [codex.md](codex/codex.md): AI Codex - A repository of learnings and errors.
16+
- [learn.md](codex/learn.md): AI Learn - Protocol for updating the AI Codex.
1717

1818
### Usage
1919

20-
1. Review the Codex: `@codex.md` (silent load, no output)
21-
2. Update the Codex: `@learn.md`
20+
1. Review the Codex: [codex.md](codex/codex.md) (silent load, no output)
21+
2. Update the Codex: [learn.md](codex/learn.md)
2222

2323
### Important Note
2424

25-
@codex.md should be added to the context of every chat:
25+
[codex.md](codex/codex.md) should be added to the context of every chat:
2626

2727
- For regular chats: Use the plus button at the top of the chat to add the file.
2828
- For Composers: Add the file to a Project Composer so all Composers created in that project will automatically have the file.
2929

3030
### Structure
3131

32-
The Codex (`codex.md`) is divided into two main sections:
32+
The [Codex](codex/codex.md) is divided into two main sections:
3333

3434
1. Errors: Mistakes made and how to prevent them.
3535
2. Learnings: Insights gained and their applications.
3636

3737
Each entry includes context, description, correction/application, and related entries.
3838

39+
## Session
40+
41+
- [start-session.md](session/start-session.md): Initiates a new AI session
42+
- [end-session.md](session/end-session.md): Concludes the current AI session
43+
44+
Session files create a "memory layer" for the AI across multiple interactions, enabling contextual awareness and adaptive assistance.
45+
46+
Key benefits:
47+
48+
- Maintains project context between sessions
49+
- Reduces repetition of project details
50+
- Provides consistent guidance aligned with project direction
51+
52+
Usage:
53+
54+
1. End a session: Use [@end-session](session/end-session.md) command
55+
2. Start a new session: Use [@start-session](session/start-session.md) command
56+
57+
The AI will generate and read status files in [status](status) to maintain project continuity.
58+
59+
## Blueprints
60+
61+
Blueprints are comprehensive guides for implementing specific technical architectures or project setups. They provide step-by-step instructions for installing, configuring, and integrating various technologies to create a functional foundation for your project.
62+
63+
- [supabase-drizzle-actions.md](blueprints/supabase-drizzle-actions.md): Backend architecture with Supabase, Drizzle ORM, and Server Actions
64+
- [flux-with-replicate.md](blueprints/flux-with-replicate.md): Image generation using Flux and Replicate
65+
66+
## Libraries
67+
68+
- [lib](lib): Contains documentation examples for library usage
69+
70+
## Plugins
71+
72+
### v0
73+
74+
- [v0.dev](https://v0.dev/) is a tool for generating React components from screenshots and chat. Currently, they don't have a Cursor plugin, so you can use [v0](v0/v0.md) bridging prompt.
75+
- [v0.md](v0/v0.md): Guide for using v0.dev to generate component ideas and prompts
76+
3977
## Contributing
4078

4179
This is an open-source template. Contributions are welcome! Please add a changelog entry with your contribution.

blueprints/flux-with-replicate.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Flux with Replicate Documentation
2+
3+
Use this guide to setup generating images with Flux and Replicate.
4+
5+
Write the complete code for every step. Do not get lazy. Write everything that is needed.
6+
7+
Your goal is to completely finish the feature.
8+
9+
## Helpful Links
10+
11+
- [Replicate](https://replicate.com)
12+
- [Flux Schnell](https://replicate.com/black-forest-labs/flux-schnell?input=nodejs)
13+
14+
## Required Environment Variables
15+
16+
Make sure the user has the following environment variables set:
17+
18+
- REPLICATE_API_TOKEN=
19+
20+
## Install Replicate
21+
22+
Make sure the user has the Replicate package installed:
23+
24+
```bash
25+
npm install replicate
26+
```
27+
28+
## Setup Steps
29+
30+
### Create a Replicate Client
31+
32+
This file should go in `/lib/replicate.ts`
33+
34+
```ts
35+
import Replicate from "replicate";
36+
37+
const replicate = new Replicate({
38+
auth: process.env.REPLICATE_API_TOKEN,
39+
});
40+
```
41+
42+
### Create a Server Action
43+
44+
This file should go in `/actions/replicate-actions.ts`
45+
46+
```ts
47+
"use server";
48+
49+
import replicate from "@/lib/replicate";
50+
51+
export async function generateFluxImage(prompt: string) {
52+
const input = {
53+
prompt: prompt,
54+
num_outputs: 1,
55+
aspect_ratio: "1:1",
56+
output_format: "webp",
57+
output_quality: 80
58+
};
59+
60+
const output = await http://replicate.run("black-forest-labs/flux-schnell", { input });
61+
return output;
62+
}
63+
```
64+
65+
### Build the Frontend
66+
67+
This file should go in `/app/flux/page.tsx`.
68+
69+
- Create a form that takes a prompt
70+
- Create a button that calls the server action
71+
- Have a nice ui for when the image is blank or loading
72+
- Display the image that is returned
73+
- Have a button to generate a new image
74+
- Have a button to download the image

0 commit comments

Comments
 (0)