cofounder/README.md

193 lines
5.6 KiB
Markdown
Raw Normal View History

2024-09-19 00:30:28 +00:00
2024-09-24 09:29:29 +00:00
![cofounder-og-black](https://github.com/user-attachments/assets/b4e51f02-59e4-4540-ac14-e1f40e20a658)
2024-09-21 03:44:03 +00:00
# Cofounder | Early alpha release
2024-09-19 00:30:28 +00:00
* project - [cofounder.openinterface.ai](https://cofounder.openinterface.ai)
* 👋 [@n_raidenai](https://x.com/n_raidenai)
**cofounder**
- full stack generative web apps ; backend + db + stateful web apps
- gen ui rooted in app architecture, with ai-guided mockup designer & modular design systems
2024-11-04 13:57:25 +00:00
---
2024-09-21 03:44:03 +00:00
2024-11-04 13:57:25 +00:00
# Early Alpha : Unstable
2024-09-21 03:44:03 +00:00
2024-11-04 13:57:25 +00:00
The following points are very emphasized :
2024-09-21 03:44:03 +00:00
2024-11-04 13:57:25 +00:00
- This is an EARLY, UNSTABLE, PREVIEW RELEASE of the project. ⚠️ Until v1 is released, it is expected to break often.
- **It consumes a lot of tokens**. If you are on a tokens budget, wait until v1 is released.
- Again, this is an early, unstable release. A first test run. An early preview of the project's ideas. Far from completion. **Open-source iterative development**. Work in progress. Unstable early alpha release. [etc]
2024-10-02 21:22:36 +00:00
2024-11-04 13:57:25 +00:00
### **If any of these might be issues for you, even in the slightest way, wait until v1 is released !**
2024-10-02 21:22:36 +00:00
2024-09-21 03:44:03 +00:00
2024-11-04 13:57:25 +00:00
---
https://github.com/user-attachments/assets/cfd09250-d21e-49fc-a29b-fa0c661abfc0
https://github.com/user-attachments/assets/c055f9c4-6bc0-4b11-ba8f-cc9f149387fa
2024-09-19 00:30:28 +00:00
---
## Important
**Early alpha release ; earlier than expected by 5/6 weeks**
Still not merged with key target features of the project, notably :
- project iteration modules for all dimensions of generated projects
- admin interface for event streams and (deeper) project iterations
- integrate the full genUI plugin :
* generative design systems
* deploy finetuned models & serve from api.cofounder
- local, browser-based dev env for the entire project scope
- add { react-native , flutter , other web frameworks }
- validations & swarm code review and autofix
- code optimization
- [...]
2024-10-02 19:56:39 +00:00
be patient :)
2024-09-19 00:30:28 +00:00
---
# Usage
## Install & Init
* Open your terminal and run
```sh
2024-10-02 19:56:39 +00:00
npx @openinterface/cofounder
2024-09-19 00:30:28 +00:00
```
Follow the instructions. The installer
- will ask you for your keys
- setup dirs & start installs
- will start the local `cofounder/api` builder and server
2024-11-05 22:21:45 +00:00
- will open the web dashboard where you can create new projects (at `http://localhost:4200` ) 🎉
2024-09-19 00:30:28 +00:00
```
note :
you will be asked for a cofounder.openinterface.ai key
it is recommended to use one as it enables the designer/layoutv1 and swarm/external-apis features
and can be used without limits during the current early alpha period
the full index will be available for local download on v1 release
```
2024-11-05 22:21:45 +00:00
- currently using `node v22` for the whole project.
2024-10-02 19:56:39 +00:00
```sh
# alternatively, you can make a new project without going through the dashboard
# by runing :
npx @openinterface/cofounder -p "YourAppProjectName" -d "describe your app here" -a "(optional) design instructions"
```
2024-09-19 00:30:28 +00:00
2024-10-02 19:56:39 +00:00
## Run Generated Apps
- Your backend & vite+react web app will incrementally generate inside `./apps/{YourApp}`
2024-09-19 00:30:28 +00:00
Open your terminal in `./apps/{YourApp}` and run
```sh
npm i && npm run dev
```
It will start both the backend and vite+react, concurrently, after installing their dependencies
Go to `http://localhost:5173/` to open the web app 🎉
2024-10-02 19:56:39 +00:00
- From within the generated apps , you can use ⌘+K / Ctrl+K to iterate on UI components
[more details later]
2024-09-19 00:30:28 +00:00
## Notes
2024-10-02 19:56:39 +00:00
### Dashboard & Local API
2024-09-19 00:30:28 +00:00
If you resume later and would like to iterate on your generated apps,
the local `./cofounder/api` server needs to be running to receive queries
You can (re)start the `local cofounder API` running the following command from `./cofounder/api`
```sh
npm run start
```
2024-11-05 22:21:45 +00:00
The dashboard will open in `http://localhost:4200`
2024-09-19 00:30:28 +00:00
2024-10-02 19:56:39 +00:00
- note: You can also generate new apps from the same env, without the the dashboard, by running, from `./cofounder/api`, one of these commands
```sh
npm run start -- -p "ProjectName" -f "some app description" -a "minimalist and spacious , light theme"
npm run start -- -p "ProjectName" -f "./example_description.txt" -a "minimalist and spacious , light theme"
```
2024-09-19 00:30:28 +00:00
### Concurrency
**[the architecture will be further detailed and documented later]**
Every "node" in the `cofounder` architecture has a defined configuration under `./cofounder/api/system/structure/nodes/{category}/{name}.yaml` to handle things like concurrency, retries and limits per time interval
For example, if you want multiple LLM generations to run in parallel (when possible - sequences and parallels are defined in DAGS under `./cofounder/api/system/structure/sequences/{definition}.yaml` ),
go to
```yaml
#./cofounder/api/system/structure/nodes/op/llm.yaml
nodes:
op:LLM::GEN:
desc: "..."
in: [model, messages, preparser, parser, query, stream]
out: [generated, usage]
queue:
concurrency: 1 # <------------------------------- here
op:LLM::VECTORIZE:
desc: "{texts} -> {vectors}"
in: [texts]
out: [vectors, usage]
mapreduce: true
op:LLM::VECTORIZE:CHUNK:
desc: "{texts} -> {vectors}"
in: [texts]
out: [vectors, usage]
queue:
concurrency: 50
```
and change the `op:LLM::GEN` parameter `concurrency` to a higher value
2024-10-02 19:56:39 +00:00
The default LLM concurrency is set to `2` so you can see what's happening in your console streams step by step - but you can increment it depending on your api keys limits
2024-09-19 00:30:28 +00:00
---
# Docs, Design Systems, ...
**[WIP]**
---
# Architecture
2024-09-21 03:44:03 +00:00
[more details later]
archi/v1 is as follows :
![architecture](https://github.com/user-attachments/assets/b2d8b70e-7a6d-45c9-a706-0cf955d13451)
2024-09-19 00:30:28 +00:00
---
2024-09-24 09:29:29 +00:00
# Credits
2024-09-19 00:30:28 +00:00
- Demo design systems built using Figma renders / UI kits from:
* blocks.pm by Hexa Plugin (see `cofounder/api/system/presets`)
* google material
* figma core
2024-10-02 19:56:39 +00:00
* shadcn
2024-10-02 21:22:36 +00:00
- Dashboard node-based ui powered by [react flow](https://reactflow.dev/)