Skip to content

Commit 340866f

Browse files
Merge branch 'Gerome-Elassaad:main' into main
2 parents 4a113f8 + 6ab0cf3 commit 340866f

File tree

586 files changed

+93986
-5391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

586 files changed

+93986
-5391
lines changed

.gitignore

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,17 @@ next-env.d.ts
4747

4848

4949
.env
50-
51-
scripts
5250
.vscode
5351
mcp.json
54-
5552
CLAUDE.md
56-
.claude
53+
# Workspace documentation (keep these files)
54+
55+
# Apps workspace - ignore build artifacts only
56+
apps/*/node_modules/
57+
apps/*/build/
58+
apps/*/dist/
59+
apps/*/.next/
60+
apps/*/out/
61+
apps/*/.env
62+
apps/*/.env.local
63+
apps/*/pnpm-lock.yaml

.vercelignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Vercel Deployment - Ignore apps workspace
2+
3+
# Apps directory (desktop app deployed separately)
4+
apps/
5+
apps/**
6+
7+
# Only deploy web app (@codinit/web) from root

README.md

Lines changed: 90 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,76 @@
1-
![opengraph](https://github.com/user-attachments/assets/de684e88-a65c-42ea-b067-d1a3bc85a420)
1+
![CodinIT.dev: AI-Powered Full-Stack Web Development in the Browser](https://github.com/user-attachments/assets/de684e88-a65c-42ea-b067-d1a3bc85a420)
22

3+
<p align="center">
4+
<strong>CodinIT.dev Build With AI In Local Enviroment or With Our Web App</strong>
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://docs.codinit.dev">Documentation</a> •
9+
<a href="https://codinit.dev">Website</a> •
10+
<a href="https://gerome-elassaad.github.io/codinit-app">Desktop App Docs</a> •
11+
<a href="#features">Features</a> •
12+
<a href="#get-started">Get Started</a>
13+
</p>
314

415
<p align="center">
516
<a href="https://e2b.dev/startups">
617
<img src="https://img.shields.io/badge/SPONSORED%20BY-E2B%20FOR%20STARTUPS-32CD32?style=for-the-badge" alt="SPONSORED BY E2B.DEV" />
718
</a>
819
</p>
920

21+
---
22+
23+
## 📦 Workspace Structure
24+
25+
> **This is a pnpm workspace monorepo** containing two applications:
26+
27+
| Application | Location | Framework | Port | Deploy |
28+
|-------------|----------|-----------|------|--------|
29+
| **@codinit/web** | `/` (root) | Next.js 14 | 3000 | Vercel |
30+
| **@codinit/desktop** | `/apps/desktop` | Remix + Electron | 5173 | Desktop installers |
31+
32+
📚 **[WORKSPACE.md](WORKSPACE.md)** - Complete workspace guide (commands, deployment, architecture)
33+
34+
---
35+
36+
## ✨ Features
1037

11-
## Features
38+
### Core Capabilities
39+
- 🚀 **AI-Powered Code Generation** - Multiple LLM providers (OpenAI, Anthropic, Google AI, and more)
40+
-**Real-time Code Execution** - Secure E2B sandboxes with live preview
41+
- 📊 **Multiple Development Environments** - Python, Next.js, Vue.js, Streamlit, Gradio
42+
- 💬 **Streaming AI Responses** - Real-time UI updates with Vercel AI SDK
43+
- 🔐 **Secure Authentication** - Supabase auth with Row Level Security
44+
- 📦 **Package Installation** - Install any npm or pip package on the fly
1245

13-
- Based on Next.js 14 (App Router, Server Actions), shadcn/ui, TailwindCSS, Vercel AI SDK.
14-
- Streaming in the UI.
15-
- Can install and use any package from npm, pip.
16-
- Supported stacks ([add your own](#adding-custom-personas)):
17-
- 🔸 Python interpreter
18-
- 🔸 Next.js
19-
- 🔸 Vue.js
20-
- 🔸 Streamlit
21-
- 🔸 Gradio
22-
- Supported LLM Providers ([add your own](#adding-custom-llm-models)):
23-
- 🔸 OpenAI
24-
- 🔸 Anthropic
25-
- 🔸 Google AI
26-
- 🔸 Mistral
27-
- 🔸 Groq
28-
- 🔸 Fireworks
29-
- 🔸 Together AI
30-
- 🔸 Ollama
46+
### Supported LLM Providers
47+
- 🔸 **OpenAI** (GPT-5, GPT-4)
48+
- 🔸 **Anthropic** (Claude models)
49+
- 🔸 **Google AI** (Gemini)
50+
- 🔸 **Groq** (Fast inference)
51+
- 🔸 **Fireworks AI**
52+
- 🔸 **Together AI**
53+
- 🔸 **Mistral AI**
54+
- 🔸 **xAI** (Grok)
55+
- 🔸 **DeepSeek**
56+
- 🔸 **Ollama** (Local models)
3157

32-
**Make sure to give us a star!**
58+
### Development Environments
59+
- 🐍 **Python Data Analyst** - Jupyter-style execution with data visualization
60+
- ⚛️ **Next.js Developer** - Full-stack React applications
61+
- 🎨 **Vue.js Developer** - Vue 3 applications
62+
- 📈 **Streamlit Developer** - Data apps and dashboards
63+
- 🎯 **Gradio Developer** - ML model interfaces
3364

34-
This is an open-source version of apps like [Anthropic's Claude Artifacts](https://www.anthropic.com/news/claude-3-5-sonnet), Vercel [v0](https://v0.dev), or [GPT Engineer](https://gptengineer.app).
65+
### Built With
66+
- **Next.js 14** (App Router, Server Actions)
67+
- **shadcn/ui** + **TailwindCSS** for beautiful UI
68+
- **Vercel AI SDK** for LLM streaming
69+
- **E2B** for secure code execution
70+
- **Supabase** for database and auth
71+
- **TypeScript** for type safety
72+
73+
**⭐ Give us a star if you like this project!**
3574

3675
## Get started
3776

@@ -47,23 +86,25 @@ This is an open-source version of apps like [Anthropic's Claude Artifacts](https
4786
In your terminal:
4887

4988
```
50-
git clone https://github.com/e2b-dev/fragments.git
89+
git clone https://github.com/Gerome-Elassaad/CodingIT.git
5190
```
5291

5392
### 2. Install the dependencies
5493

5594
Enter the repository:
5695

5796
```
58-
cd fragments
97+
cd CodingIT
5998
```
6099

61-
Run the following to install the required dependencies:
100+
Run the following to install the required dependencies for both workspaces:
62101

63102
```
64-
npm i
103+
pnpm install
65104
```
66105

106+
> **Note:** This project uses **pnpm workspaces**. The command above installs dependencies for both the web app and desktop app.
107+
67108
### 3. Set the environment variables
68109

69110
Create a `.env.local` file and set the following:
@@ -118,133 +159,41 @@ NEXT_PUBLIC_POSTHOG_HOST=
118159

119160
### 4. Start the development server
120161

162+
**Web App (Next.js):**
121163
```
122-
npm run dev
164+
pnpm dev
123165
```
166+
Visit http://localhost:3000
124167

125-
### 5. Build the web app
126-
168+
**Desktop App (Electron + Remix):**
127169
```
128-
npm run build
170+
pnpm desktop:dev
129171
```
172+
Or:
173+
```
174+
cd apps/desktop && pnpm dev
175+
```
176+
Visit http://localhost:5173
130177

131-
## Customize
132-
133-
### Adding custom personas
134-
135-
1. Make sure [E2B CLI](https://e2b.dev/docs/cli) is installed and you're logged in.
136-
137-
2. Add a new folder under [sandbox-templates/](sandbox-templates/)
138-
139-
3. Initialize a new template using E2B CLI:
140-
141-
```
142-
e2b template init
143-
```
144-
145-
This will create a new file called `e2b.Dockerfile`.
146-
147-
4. Adjust the `e2b.Dockerfile`
148-
149-
Here's an example streamlit template:
150-
151-
```Dockerfile
152-
# You can use most Debian-based base images
153-
FROM python:3.19-slim
154-
155-
RUN pip3 install --no-cache-dir streamlit pandas numpy matplotlib requests seaborn plotly
156-
157-
# Copy the code to the container
158-
WORKDIR /home/user
159-
COPY . /home/user
160-
```
161-
162-
5. Specify a custom start command in `e2b.toml`:
163-
164-
```toml
165-
start_cmd = "cd /home/user && streamlit run app.py"
166-
```
167-
168-
6. Deploy the template with the E2B CLI
169-
170-
```
171-
e2b template build --name <template-name>
172-
```
173-
174-
After the build has finished, you should get the following message:
175-
176-
```
177-
✅ Building sandbox template <template-id> <template-name> finished.
178-
```
179-
180-
7. Open [lib/templates.json](lib/templates.json) in your code editor.
181-
182-
Add your new template to the list. Here's an example for Streamlit:
183-
184-
```json
185-
"streamlit-developer": {
186-
"name": "Streamlit developer",
187-
"lib": [
188-
"streamlit",
189-
"pandas",
190-
"numpy",
191-
"matplotlib",
192-
"request",
193-
"seaborn",
194-
"plotly"
195-
],
196-
"file": "app.py",
197-
"instructions": "A streamlit app that reloads automatically.",
198-
"port": 8501 // can be null
199-
},
200-
```
201-
202-
Provide a template id (as key), name, list of dependencies, entrypoint and a port (optional). You can also add additional instructions that will be given to the LLM.
203-
204-
4. Optionally, add a new logo under [public/thirdparty/templates](public/thirdparty/templates)
205-
206-
### Adding custom LLM models
207-
208-
1. Open [lib/models.json](lib/models.ts) in your code editor.
209-
210-
2. Add a new entry to the models list:
211-
212-
```json
213-
{
214-
"id": "mistral-large",
215-
"name": "Mistral Large",
216-
"provider": "Ollama",
217-
"providerId": "ollama"
218-
}
219-
```
220-
221-
Where id is the model id, name is the model name (visible in the UI), provider is the provider name and providerId is the provider tag (see [adding providers](#adding-custom-llm-providers) below).
222-
223-
### Adding custom LLM providers
224-
225-
1. Open [lib/models.ts](lib/models.ts) in your code editor.
226-
227-
2. Add a new entry to the `providerConfigs` list:
228-
229-
Example for fireworks:
230-
231-
```ts
232-
fireworks: () => createOpenAI({ apiKey: apiKey || process.env.FIREWORKS_API_KEY, baseURL: baseURL || 'https://api.fireworks.ai/inference/v1' })(modelNameString),
233-
```
234-
235-
3. Optionally, adjust the default structured output mode in the `getDefaultMode` function:
178+
### 5. Build the applications
236179

237-
```ts
238-
if (providerId === 'fireworks') {
239-
return 'json'
240-
}
241-
```
180+
**Web App:**
181+
```
182+
pnpm build
183+
```
242184

243-
4. Optionally, add a new logo under [public/thirdparty/logos](public/thirdparty/logos)
185+
**Desktop App:**
186+
```
187+
pnpm desktop:build # Build all platforms
188+
pnpm desktop:build:mac # macOS only
189+
pnpm desktop:build:win # Windows only
190+
pnpm desktop:build:linux # Linux only
191+
```
244192

245193
## Contributing
246194

247195
As an open-source project, we welcome contributions from the community. If you are experiencing any bugs or want to add some improvements, please feel free to open an issue or pull request.
196+
248197
## 🔧 Customize
249198

250199
### Adding Custom Development Templates

0 commit comments

Comments
 (0)