Skip to content

Commit 4293155

Browse files
committed
Update v0.4
1 parent 8953eba commit 4293155

8 files changed

Lines changed: 385 additions & 91 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: "20"
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v2
31+
with:
32+
version: 8
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Build
38+
run: pnpm build
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: ./dist
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

README.md

Lines changed: 142 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,149 @@
1-
<div align="center">
2-
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
3-
</div>
1+
# Epoch
42

5-
# Run and deploy your AI Studio app
3+
**See your life unfold.** A beautiful, intuitive timeline editor that helps you visualize your journey—past milestones, present projects, and future dreams—all in one panoramic view.
64

7-
This contains everything you need to run your app locally.
5+
## Features
86

9-
View your app in AI Studio: https://ai.studio/apps/drive/1BIBEpiSaPPg97k-ECttw5iztWrXJqPYd
7+
- **Multi-Track Timeline** - Organize events into separate tracks (Work, Personal, Learning, etc.)
8+
- **Drag & Drop** - Move events by dragging, resize by dragging edges
9+
- **Smart Lane Stacking** - Overlapping events automatically stack in lanes
10+
- **Dynamic Track Heights** - Tracks expand to fit overlapping events
11+
- **Zoom Controls** - From year overview to day-level detail
12+
- **Color Coding** - Customizable colors for tracks and individual events
13+
- **Import/Export** - Save and load timelines as JSON files
14+
- **Responsive Design** - Works on desktop and tablet
1015

11-
## Run Locally
16+
## Quick Start
1217

13-
**Prerequisites:** Node.js
18+
**Prerequisites:** Node.js 18+
1419

20+
```bash
21+
# Install dependencies
22+
npm install
23+
# or
24+
pnpm install
1525

16-
1. Install dependencies:
17-
`npm install`
18-
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
19-
3. Run the app:
20-
`npm run dev`
26+
# Start development server
27+
npm run dev
28+
# or
29+
pnpm run dev
30+
```
31+
32+
## Usage
33+
34+
| Action | How |
35+
| ---------------- | ------------------------------------------- |
36+
| **Add Event** | Double-click on empty canvas |
37+
| **Edit Event** | Double-click on an event |
38+
| **Move Event** | Drag the event |
39+
| **Resize Event** | Drag the left or right edge |
40+
| **Add Track** | Click the + button in the sidebar |
41+
| **Edit Track** | Hover over track name, click "Edit" |
42+
| **Zoom** | Use zoom controls in header or scroll wheel |
43+
| **Pan** | Click and drag on empty canvas |
44+
45+
## 🏗️ Tech Stack
46+
47+
- **React 19** - UI framework
48+
- **TypeScript** - Type safety
49+
- **Vite** - Build tool and dev server
50+
- **Tailwind CSS** - Styling
51+
- **Lucide React** - Icons
52+
53+
## 📁 Project Structure
54+
55+
```
56+
├── App.tsx # Main application component
57+
├── components/
58+
│ ├── AppHeader.tsx # Header with zoom controls
59+
│ ├── TimelineCanvas.tsx # Main timeline rendering
60+
│ ├── TrackSidebar.tsx # Track list sidebar
61+
│ ├── EventModal.tsx # Event editor modal
62+
│ ├── TrackModal.tsx # Track editor modal
63+
│ └── DataModal.tsx # Import/export settings
64+
├── utils/
65+
│ ├── dateUtils.ts # Date manipulation helpers
66+
│ └── eventLanes.ts # Lane calculation for overlapping events
67+
├── types.ts # TypeScript interfaces
68+
└── constants.ts # Default data and configuration
69+
```
70+
71+
## 🎨 Customization
72+
73+
### Colors
74+
75+
Edit the `COLOR_PALETTE` in `constants.ts` to customize available colors:
76+
77+
```typescript
78+
export const COLOR_PALETTE = [
79+
"#ef4444", // Red
80+
"#f97316", // Orange
81+
"#10b981", // Emerald
82+
"#3b82f6", // Blue
83+
// ... add more
84+
];
85+
```
86+
87+
### Zoom Levels
88+
89+
Adjust zoom levels in `constants.ts`:
90+
91+
```typescript
92+
export const ZOOM_LEVELS = [0.5, 1, 2.5, 5, 10, 25, 50, 100, 200];
93+
// Values represent pixels per day
94+
```
95+
96+
## Data Format
97+
98+
Epoch uses a simple JSON format for import/export:
99+
100+
```json
101+
{
102+
"tracks": [{ "id": "1", "title": "Work", "color": "#3b82f6", "order": 0 }],
103+
"events": [
104+
{
105+
"id": "e1",
106+
"trackId": "1",
107+
"title": "Project Launch",
108+
"startDate": "2024-01-15",
109+
"endDate": "2024-02-28",
110+
"color": "#3b82f6"
111+
}
112+
]
113+
}
114+
```
115+
116+
## Deployment
117+
118+
### GitHub Pages (Automatic)
119+
120+
This project includes a GitHub Actions workflow for automatic deployment:
121+
122+
1. Push your code to the `main` branch
123+
2. Go to **Settings → Pages** in your GitHub repository
124+
3. Set **Source** to "GitHub Actions"
125+
4. The site will deploy automatically on every push
126+
127+
### Manual Build
128+
129+
```bash
130+
# Build for production
131+
npm run build
132+
# or
133+
pnpm build
134+
135+
# Preview the build locally
136+
npm run preview
137+
```
138+
139+
The built files will be in the `dist/` folder, ready to deploy to any static hosting service.
140+
141+
## Contributing
142+
143+
Contributions are welcome! Please feel free to submit a Pull Request.
144+
145+
1. Fork the repository
146+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
147+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
148+
4. Push to the branch (`git push origin feature/amazing-feature`)
149+
5. Open a Pull Request

components/AppHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const AppHeader: React.FC<AppHeaderProps> = ({
7171
</div>
7272
<div>
7373
<h1 className="text-lg font-bold text-slate-900 tracking-tight leading-none">
74-
TimeLiner
74+
Epoch
7575
</h1>
7676
<span className="text-[10px] font-medium text-slate-400 tracking-wider uppercase">
7777
Timeline Editor

0 commit comments

Comments
 (0)