Spaces:
Running
MASTER PROMPT — BUILD FROM SCRATCH
Browse filesApp Codename: BRO
You are an autonomous AI product designer, motion designer, and full-stack engineer.
Your task is to design and build a complete productivity application from scratch named BRO.
BRO is:
Inspired by Notion
Much simpler
Much more capable
Designed as if it were born from AI itself
This is not a clone.
This is a new category: a calm, intelligent personal workspace.
🎯 CORE PRODUCT VISION
BRO helps people:
Think clearly
Track effortlessly
Organize life without friction
Build personal systems without complexity
BRO should feel:
Light
Calm
Fast
Intelligent
Premium
If Notion feels like a tool, BRO feels like a space.
🎨 DESIGN LANGUAGE (CRITICAL)
🎨 Color System
Primary palette: Mint Green
Supporting tones:
Soft whites
Pale greys
Subtle pastel gradients
No harsh colors
No visual noise
🌀 Motion & Animation
Smooth, Apple-like motion graphics
Subtle parallax
Gentle fades, slides, scale-in effects
Micro-interactions on hover, click, focus
Animations must feel alive but calm
✨ Visual Style
Clean
Minimal
Rounded corners
Soft shadows
Gradient depth
Premium typography
Modern, AI-native look
BRO must look like:
“This app was built in 2025 by AI — not humans copying old design systems.”
🧠 CORE FUNCTIONALITY
1️⃣ Writing (Notes, Ideas, Thoughts)
Free-form writing
Blocks (text, checklist, heading, quote)
Fast, distraction-free editor
Markdown support (optional)
2️⃣ Universal Tracking
Users can track:
Habits
Tasks
Goals
Mood
Learning
Finance
Anything they invent
Trackers can be:
Created manually
Generated from natural language
3️⃣ Simple Databases (Without Complexity)
Tables, lists, cards
No confusing properties
No heavy setup
Relationships only when needed
🧠 AI INTEGRATION (BUILT-IN, NOT LOUD)
AI in BRO must feel invisible and helpful, not chatty.
AI can:
Turn messy text into clean structure
Suggest trackers
Summarize notes
Detect patterns
Help plan days or weeks
AI must:
Never block offline use
Never overwhelm the UI
Appear only when useful
Include config:
const AI_CONFIG = {
provider: "gemini",
mode: "assistive",
apiKeyField: true, // user can add their own key
offlineFallback: true
};
🧩 FEATURE SET PEOPLE ACTUALLY WANT (NOTION MISSES)
🔹 One-Click Simplicity
Everything works in 1–2 clicks
No deep nesting hell
🔹 Custom Home Screen
When the user opens BRO, they can:
Choose what they see first
Reorder sections
Hide what they don’t use
🔹 Offline-First
App works fully offline
Local storage first
Sync when online
🔹 Fast Search (Brain-Like)
Search notes
Search trackers
Search ideas
Smart suggestions
🔐 USER SYSTEM
Login page
Email + password
Google login
Each user has:
Personal workspace
Saved layouts
Preferences
🧱 BACKEND (REAL, NOT FAKE)
Use free-tier friendly backend:
Supabase or Firebase
Must support:
Auth
Data persistence
Notes
Trackers
User preferences
Workspace layout
No mock data.
Everything must actually save and load.
🖥️ FRONTEND REQUIREMENTS
Responsive (desktop + tablet + mobile)
Component-based
Drag-and-drop where useful
Clean state management
🧪 ONBOARDING (SHORT & SMART)
No long tutorials.
On first launch:
Ask what the user wants to do
Create their first space
Show them value immediately
📦 REQUIRED OUTPUTS
Generate:
App architecture
UI structure
Color & motion system
Database schema
Auth flow
AI wiring
Offline logic
Deployment-ready code structure
Avoid:
“Coming soon”
“TODO”
Concept-only explanations
This must feel ready to ship.
🧠 FINAL RULE
Build BRO as if:
Millions of people will live inside it every day.
Simple.
Powerful.
Calm.
Intelligent.
🟢 WHY THIS PROMPT IS STRONG
Clean slate (no constraints)
Clear design direction
AI-native, not AI-gimmick
Simpler than Notion, but deeper
Perfect for vibe coders
- README.md +8 -5
- components/editor.js +85 -0
- components/sidebar.js +102 -0
- index.html +56 -19
- script.js +93 -0
- style.css +167 -18
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: MindFlow Workspace 🌊
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: pink
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomEditor extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: flex;
|
| 8 |
+
flex-direction: column;
|
| 9 |
+
flex: 1;
|
| 10 |
+
padding: 2rem;
|
| 11 |
+
overflow-y: auto;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
.toolbar {
|
| 15 |
+
display: flex;
|
| 16 |
+
gap: 0.5rem;
|
| 17 |
+
margin-bottom: 1rem;
|
| 18 |
+
padding-bottom: 1rem;
|
| 19 |
+
border-bottom: 1px solid #e2e8f0;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.tool-btn {
|
| 23 |
+
background: none;
|
| 24 |
+
border: none;
|
| 25 |
+
padding: 0.5rem;
|
| 26 |
+
border-radius: 4px;
|
| 27 |
+
cursor: pointer;
|
| 28 |
+
transition: all 0.2s;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.tool-btn:hover {
|
| 32 |
+
background-color: #c0f0e2;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.content {
|
| 36 |
+
min-height: 100%;
|
| 37 |
+
outline: none;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.content h1 {
|
| 41 |
+
font-size: 2rem;
|
| 42 |
+
margin-bottom: 1.5rem;
|
| 43 |
+
color: #5aa58b;
|
| 44 |
+
font-family: 'Inter', sans-serif;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.content p {
|
| 48 |
+
line-height: 1.6;
|
| 49 |
+
margin-bottom: 1rem;
|
| 50 |
+
font-family: 'Inter', sans-serif;
|
| 51 |
+
}
|
| 52 |
+
</style>
|
| 53 |
+
|
| 54 |
+
<div class="toolbar">
|
| 55 |
+
<button class="tool-btn">H1</button>
|
| 56 |
+
<button class="tool-btn">H2</button>
|
| 57 |
+
<button class="tool-btn">B</button>
|
| 58 |
+
<button class="tool-btn">I</button>
|
| 59 |
+
<button class="tool-btn">📋</button>
|
| 60 |
+
<button class="tool-btn">✅</button>
|
| 61 |
+
</div>
|
| 62 |
+
|
| 63 |
+
<div class="content" contenteditable="true">
|
| 64 |
+
<h1>Welcome to MindFlow</h1>
|
| 65 |
+
<p>Start writing or type '/' for commands...</p>
|
| 66 |
+
</div>
|
| 67 |
+
`;
|
| 68 |
+
|
| 69 |
+
// Add editor functionality
|
| 70 |
+
const content = this.shadowRoot.querySelector('.content');
|
| 71 |
+
|
| 72 |
+
content.addEventListener('keydown', (e) => {
|
| 73 |
+
if (e.key === '/') {
|
| 74 |
+
this.showCommandMenu();
|
| 75 |
+
}
|
| 76 |
+
});
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
showCommandMenu() {
|
| 80 |
+
// TODO: Implement command menu
|
| 81 |
+
console.log('Show command menu');
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
customElements.define('custom-editor', CustomEditor);
|
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomSidebar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
width: 280px;
|
| 9 |
+
background-color: #ffffff;
|
| 10 |
+
border-right: 1px solid #e2e8f0;
|
| 11 |
+
height: 100vh;
|
| 12 |
+
padding: 1.5rem;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.sidebar-header {
|
| 16 |
+
margin-bottom: 2rem;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.logo {
|
| 20 |
+
font-size: 1.5rem;
|
| 21 |
+
font-weight: 600;
|
| 22 |
+
color: #5aa58b;
|
| 23 |
+
margin-bottom: 1rem;
|
| 24 |
+
font-family: 'Inter', sans-serif;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.new-btn {
|
| 28 |
+
width: 100%;
|
| 29 |
+
padding: 0.75rem;
|
| 30 |
+
background-color: #8bd8bd;
|
| 31 |
+
color: white;
|
| 32 |
+
border: none;
|
| 33 |
+
border-radius: 8px;
|
| 34 |
+
font-weight: 500;
|
| 35 |
+
cursor: pointer;
|
| 36 |
+
transition: all 0.2s;
|
| 37 |
+
font-family: 'Inter', sans-serif;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.new-btn:hover {
|
| 41 |
+
background-color: #5aa58b;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
nav ul {
|
| 45 |
+
list-style: none;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
nav li {
|
| 49 |
+
margin-bottom: 0.5rem;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
nav a {
|
| 53 |
+
display: flex;
|
| 54 |
+
align-items: center;
|
| 55 |
+
padding: 0.75rem;
|
| 56 |
+
border-radius: 8px;
|
| 57 |
+
color: #4a5568;
|
| 58 |
+
text-decoration: none;
|
| 59 |
+
transition: all 0.2s;
|
| 60 |
+
font-family: 'Inter', sans-serif;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
nav a:hover {
|
| 64 |
+
background-color: #c0f0e2;
|
| 65 |
+
color: #5aa58b;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.active a {
|
| 69 |
+
background-color: #c0f0e2;
|
| 70 |
+
color: #5aa58b;
|
| 71 |
+
font-weight: 500;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.icon {
|
| 75 |
+
margin-right: 0.75rem;
|
| 76 |
+
font-size: 1.1rem;
|
| 77 |
+
}
|
| 78 |
+
</style>
|
| 79 |
+
|
| 80 |
+
<div class="sidebar-header">
|
| 81 |
+
<div class="logo">MindFlow</div>
|
| 82 |
+
<button class="new-btn">+ New</button>
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
<nav>
|
| 86 |
+
<ul>
|
| 87 |
+
<li class="active"><a href="#"><span class="icon">📝</span> Notes</a></li>
|
| 88 |
+
<li><a href="#"><span class="icon">📊</span> Trackers</a></li>
|
| 89 |
+
<li><a href="#"><span class="icon">🗂️</span> Databases</a></li>
|
| 90 |
+
<li><a href="#"><span class="icon">⚙️</span> Settings</a></li>
|
| 91 |
+
</ul>
|
| 92 |
+
</nav>
|
| 93 |
+
`;
|
| 94 |
+
|
| 95 |
+
// Add event listeners
|
| 96 |
+
this.shadowRoot.querySelector('.new-btn').addEventListener('click', () => {
|
| 97 |
+
this.dispatchEvent(new CustomEvent('new-note'));
|
| 98 |
+
});
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
customElements.define('custom-sidebar', CustomSidebar);
|
|
@@ -1,19 +1,56 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>MindFlow Workspace</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<div class="app-container">
|
| 13 |
+
<aside class="sidebar">
|
| 14 |
+
<div class="sidebar-header">
|
| 15 |
+
<h1 class="logo">MindFlow</h1>
|
| 16 |
+
<button class="new-note-btn">+ New</button>
|
| 17 |
+
</div>
|
| 18 |
+
<nav class="sidebar-nav">
|
| 19 |
+
<ul>
|
| 20 |
+
<li class="active"><a href="#"><i class="icon">📝</i> Notes</a></li>
|
| 21 |
+
<li><a href="#"><i class="icon">📊</i> Trackers</a></li>
|
| 22 |
+
<li><a href="#"><i class="icon">🗂️</i> Databases</a></li>
|
| 23 |
+
<li><a href="#"><i class="icon">⚙️</i> Settings</a></li>
|
| 24 |
+
</ul>
|
| 25 |
+
</nav>
|
| 26 |
+
</aside>
|
| 27 |
+
|
| 28 |
+
<main class="workspace">
|
| 29 |
+
<div class="workspace-header">
|
| 30 |
+
<div class="breadcrumbs">All Notes</div>
|
| 31 |
+
<div class="search-bar">
|
| 32 |
+
<input type="text" placeholder="Search or ask AI...">
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<div class="note-editor">
|
| 37 |
+
<div class="note-toolbar">
|
| 38 |
+
<button class="tool-btn">H1</button>
|
| 39 |
+
<button class="tool-btn">H2</button>
|
| 40 |
+
<button class="tool-btn">B</button>
|
| 41 |
+
<button class="tool-btn">I</button>
|
| 42 |
+
<button class="tool-btn">📋</button>
|
| 43 |
+
<button class="tool-btn">✅</button>
|
| 44 |
+
</div>
|
| 45 |
+
<div class="note-content" contenteditable="true">
|
| 46 |
+
<h1>Welcome to MindFlow</h1>
|
| 47 |
+
<p>Start writing or type '/' for commands...</p>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
</main>
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
<script src="script.js"></script>
|
| 54 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 55 |
+
</body>
|
| 56 |
+
</html>
|
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Initialize Supabase
|
| 2 |
+
const supabaseUrl = 'YOUR_SUPABASE_URL';
|
| 3 |
+
const supabaseKey = 'YOUR_SUPABASE_KEY';
|
| 4 |
+
const supabase = supabase.createClient(supabaseUrl, supabaseKey);
|
| 5 |
+
|
| 6 |
+
// DOM Elements
|
| 7 |
+
const newNoteBtn = document.querySelector('.new-note-btn');
|
| 8 |
+
const noteContent = document.querySelector('.note-content');
|
| 9 |
+
const searchInput = document.querySelector('.search-bar input');
|
| 10 |
+
|
| 11 |
+
// Event Listeners
|
| 12 |
+
newNoteBtn.addEventListener('click', createNewNote);
|
| 13 |
+
searchInput.addEventListener('input', handleSearch);
|
| 14 |
+
|
| 15 |
+
// Functions
|
| 16 |
+
async function createNewNote() {
|
| 17 |
+
try {
|
| 18 |
+
const { data, error } = await supabase
|
| 19 |
+
.from('notes')
|
| 20 |
+
.insert([{
|
| 21 |
+
title: 'Untitled Note',
|
| 22 |
+
content: '',
|
| 23 |
+
created_at: new Date()
|
| 24 |
+
}])
|
| 25 |
+
.select();
|
| 26 |
+
|
| 27 |
+
if (error) throw error;
|
| 28 |
+
|
| 29 |
+
// Clear editor and focus
|
| 30 |
+
noteContent.innerHTML = '<h1>Untitled Note</h1><p></p>';
|
| 31 |
+
noteContent.focus();
|
| 32 |
+
|
| 33 |
+
console.log('New note created:', data);
|
| 34 |
+
} catch (error) {
|
| 35 |
+
console.error('Error creating note:', error);
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
function handleSearch(e) {
|
| 40 |
+
const query = e.target.value.trim();
|
| 41 |
+
if (query.length > 2) {
|
| 42 |
+
searchNotes(query);
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
async function searchNotes(query) {
|
| 47 |
+
try {
|
| 48 |
+
const { data, error } = await supabase
|
| 49 |
+
.from('notes')
|
| 50 |
+
.select()
|
| 51 |
+
.textSearch('content', query);
|
| 52 |
+
|
| 53 |
+
if (error) throw error;
|
| 54 |
+
|
| 55 |
+
console.log('Search results:', data);
|
| 56 |
+
// TODO: Display search results
|
| 57 |
+
} catch (error) {
|
| 58 |
+
console.error('Error searching notes:', error);
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
// Initialize the app
|
| 63 |
+
async function initApp() {
|
| 64 |
+
// Check auth status
|
| 65 |
+
const { data: { user } } = await supabase.auth.getUser();
|
| 66 |
+
|
| 67 |
+
if (!user) {
|
| 68 |
+
// Redirect to login if not authenticated
|
| 69 |
+
window.location.href = '/login.html';
|
| 70 |
+
} else {
|
| 71 |
+
// Load user's notes
|
| 72 |
+
loadNotes();
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
async function loadNotes() {
|
| 77 |
+
try {
|
| 78 |
+
const { data, error } = await supabase
|
| 79 |
+
.from('notes')
|
| 80 |
+
.select()
|
| 81 |
+
.order('created_at', { ascending: false });
|
| 82 |
+
|
| 83 |
+
if (error) throw error;
|
| 84 |
+
|
| 85 |
+
console.log('Loaded notes:', data);
|
| 86 |
+
// TODO: Display notes in sidebar
|
| 87 |
+
} catch (error) {
|
| 88 |
+
console.error('Error loading notes:', error);
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
// Start the app
|
| 93 |
+
document.addEventListener('DOMContentLoaded', initApp);
|
|
@@ -1,28 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:root {
|
| 2 |
+
--primary: #8bd8bd;
|
| 3 |
+
--primary-light: #c0f0e2;
|
| 4 |
+
--primary-dark: #5aa58b;
|
| 5 |
+
--text: #2d3748;
|
| 6 |
+
--text-light: #4a5568;
|
| 7 |
+
--bg: #f8fafc;
|
| 8 |
+
--sidebar-bg: #ffffff;
|
| 9 |
+
--border: #e2e8f0;
|
| 10 |
+
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
* {
|
| 14 |
+
margin: 0;
|
| 15 |
+
padding: 0;
|
| 16 |
+
box-sizing: border-box;
|
| 17 |
+
font-family: 'Inter', sans-serif;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
body {
|
| 21 |
+
background-color: var(--bg);
|
| 22 |
+
color: var(--text);
|
| 23 |
+
height: 100vh;
|
| 24 |
+
overflow: hidden;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.app-container {
|
| 28 |
+
display: flex;
|
| 29 |
+
height: 100%;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.sidebar {
|
| 33 |
+
width: 280px;
|
| 34 |
+
background-color: var(--sidebar-bg);
|
| 35 |
+
border-right: 1px solid var(--border);
|
| 36 |
+
padding: 1.5rem;
|
| 37 |
+
display: flex;
|
| 38 |
+
flex-direction: column;
|
| 39 |
+
height: 100%;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.sidebar-header {
|
| 43 |
+
margin-bottom: 2rem;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.logo {
|
| 47 |
+
font-size: 1.5rem;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
color: var(--primary-dark);
|
| 50 |
+
margin-bottom: 1rem;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.new-note-btn {
|
| 54 |
+
width: 100%;
|
| 55 |
+
padding: 0.75rem;
|
| 56 |
+
background-color: var(--primary);
|
| 57 |
+
color: white;
|
| 58 |
+
border: none;
|
| 59 |
+
border-radius: 8px;
|
| 60 |
+
font-weight: 500;
|
| 61 |
+
cursor: pointer;
|
| 62 |
+
transition: all 0.2s;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.new-note-btn:hover {
|
| 66 |
+
background-color: var(--primary-dark);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.sidebar-nav ul {
|
| 70 |
+
list-style: none;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.sidebar-nav li {
|
| 74 |
+
margin-bottom: 0.5rem;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.sidebar-nav a {
|
| 78 |
+
display: flex;
|
| 79 |
+
align-items: center;
|
| 80 |
+
padding: 0.75rem;
|
| 81 |
+
border-radius: 8px;
|
| 82 |
+
color: var(--text-light);
|
| 83 |
+
text-decoration: none;
|
| 84 |
+
transition: all 0.2s;
|
| 85 |
}
|
| 86 |
|
| 87 |
+
.sidebar-nav a:hover {
|
| 88 |
+
background-color: var(--primary-light);
|
| 89 |
+
color: var(--primary-dark);
|
| 90 |
}
|
| 91 |
|
| 92 |
+
.sidebar-nav .active a {
|
| 93 |
+
background-color: var(--primary-light);
|
| 94 |
+
color: var(--primary-dark);
|
| 95 |
+
font-weight: 500;
|
|
|
|
| 96 |
}
|
| 97 |
|
| 98 |
+
.icon {
|
| 99 |
+
margin-right: 0.75rem;
|
| 100 |
+
font-size: 1.1rem;
|
|
|
|
|
|
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
+
.workspace {
|
| 104 |
+
flex: 1;
|
| 105 |
+
display: flex;
|
| 106 |
+
flex-direction: column;
|
| 107 |
+
overflow: hidden;
|
| 108 |
}
|
| 109 |
+
|
| 110 |
+
.workspace-header {
|
| 111 |
+
padding: 1.5rem;
|
| 112 |
+
display: flex;
|
| 113 |
+
justify-content: space-between;
|
| 114 |
+
align-items: center;
|
| 115 |
+
border-bottom: 1px solid var(--border);
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.breadcrumbs {
|
| 119 |
+
font-weight: 500;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.search-bar input {
|
| 123 |
+
padding: 0.5rem 1rem;
|
| 124 |
+
border: 1px solid var(--border);
|
| 125 |
+
border-radius: 8px;
|
| 126 |
+
width: 300px;
|
| 127 |
+
outline: none;
|
| 128 |
+
transition: all 0.2s;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.search-bar input:focus {
|
| 132 |
+
border-color: var(--primary);
|
| 133 |
+
box-shadow: 0 0 0 2px var(--primary-light);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.note-editor {
|
| 137 |
+
flex: 1;
|
| 138 |
+
padding: 2rem;
|
| 139 |
+
overflow-y: auto;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.note-toolbar {
|
| 143 |
+
display: flex;
|
| 144 |
+
gap: 0.5rem;
|
| 145 |
+
margin-bottom: 1rem;
|
| 146 |
+
padding-bottom: 1rem;
|
| 147 |
+
border-bottom: 1px solid var(--border);
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.tool-btn {
|
| 151 |
+
background: none;
|
| 152 |
+
border: none;
|
| 153 |
+
padding: 0.5rem;
|
| 154 |
+
border-radius: 4px;
|
| 155 |
+
cursor: pointer;
|
| 156 |
+
transition: all 0.2s;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.tool-btn:hover {
|
| 160 |
+
background-color: var(--primary-light);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.note-content {
|
| 164 |
+
min-height: 100%;
|
| 165 |
+
outline: none;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.note-content h1 {
|
| 169 |
+
font-size: 2rem;
|
| 170 |
+
margin-bottom: 1.5rem;
|
| 171 |
+
color: var(--primary-dark);
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.note-content p {
|
| 175 |
+
line-height: 1.6;
|
| 176 |
+
margin-bottom: 1rem;
|
| 177 |
+
}
|