Skip to content

Commit 956d16a

Browse files
committed
feat(frontend): add initial frontend structure with components, services, and assets
1 parent 482c169 commit 956d16a

File tree

218 files changed

+44030
-1458
lines changed

Some content is hidden

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

218 files changed

+44030
-1458
lines changed

frontend/.cursorrules

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Next.js Project Rules
2+
3+
## Language
4+
- All code, comments, documentation, commits, and PRs MUST be written in English.
5+
6+
## Architecture
7+
8+
### Folder Structure
9+
- `/app`: App router pages and API routes
10+
- Route-specific components should be placed in their respective route folders
11+
- `/components`: Reusable UI components
12+
- `/ui`: Shadcn UI components and their derivatives
13+
- `/contexts`: React Context providers
14+
- `/hooks`: Custom React hooks
15+
- `/lib`: Utility functions and configuration
16+
- `/public`: Static assets
17+
- `/services`: API service functions
18+
- `/styles`: Global styles
19+
- `/types`: TypeScript type definitions
20+
21+
### Component Guidelines
22+
- Use functional components with TypeScript
23+
- Use the `.tsx` extension for React components
24+
- Follow a logical naming convention:
25+
- Complex components: Use PascalCase and create folders with an index.tsx file
26+
- Simple components: Single PascalCase named files
27+
28+
### State Management
29+
- Use React Context for global state
30+
- Use React hooks for local state
31+
- Avoid prop drilling more than 2 levels deep
32+
33+
### API & Data Fetching
34+
- Use API service modules in `/services` directory
35+
- Implement proper error handling and loading states
36+
- Use React Query or SWR for complex data fetching where appropriate
37+
38+
## Development Patterns
39+
40+
### Code Quality
41+
- Maintain type safety - avoid using `any` type
42+
- Write self-documenting code with descriptive names
43+
- Keep components focused on a single responsibility
44+
- Extract complex logic into custom hooks
45+
- Follow DRY (Don't Repeat Yourself) principle
46+
47+
### CSS & Styling
48+
- Use Tailwind CSS for styling
49+
- Use Shadcn UI components as base building blocks
50+
- Maintain consistent spacing and sizing
51+
52+
### Performance
53+
- Avoid unnecessary re-renders
54+
- Optimize images and assets
55+
- Implement code splitting where appropriate
56+
- Use dynamic imports for large components/pages
57+
58+
### Testing
59+
- Write tests for critical business logic
60+
- Test components in isolation
61+
- Implement end-to-end tests for critical user flows
62+
63+
## Git Workflow
64+
65+
### Branch Naming
66+
- Features: `feature/short-description`
67+
- Bugfixes: `fix/short-description`
68+
- Hotfixes: `hotfix/short-description`
69+
- Releases: `release/version`
70+
71+
## Conventions
72+
- Variable and function names in English
73+
- Log and error messages in English
74+
- Documentation in English
75+
- User-facing content (emails, responses) in English
76+
- Indentation with 4 spaces
77+
- Maximum of 79 characters per line
78+
79+
## Commit Rules
80+
- Use Conventional Commits format for all commit messages
81+
- Format: `<type>(<scope>): <description>`
82+
- Types:
83+
- `feat`: A new feature
84+
- `fix`: A bug fix
85+
- `docs`: Documentation changes
86+
- `style`: Changes that do not affect code meaning (formatting, etc.)
87+
- `refactor`: Code changes that neither fix a bug nor add a feature
88+
- `perf`: Performance improvements
89+
- `test`: Adding or modifying tests
90+
- `chore`: Changes to build process or auxiliary tools
91+
- Scope is optional and should be the module or component affected
92+
- Description should be concise, in the imperative mood, and not capitalized
93+
- Use body for more detailed explanations if needed
94+
- Reference issues in the footer with `Fixes #123` or `Relates to #123`
95+
- Examples:
96+
- `feat(auth): add password reset functionality`
97+
- `fix(api): correct validation error in client registration`
98+
- `docs: update API documentation for new endpoints`
99+
- `refactor(services): improve error handling in authentication`
100+
101+
Format: `type(scope): subject`
102+
103+
Examples:
104+
- `feat(auth): add login form validation`
105+
- `fix(api): resolve user data fetching issue`
106+
- `docs(readme): update installation instructions`
107+
- `style(components): format according to style guide`
108+
109+
### Pull Requests
110+
- Keep PRs focused on a single feature or fix
111+
- Include descriptive titles and descriptions
112+
- Reference related issues
113+
- Request code reviews from appropriate team members
114+
- Ensure CI checks pass before merging
115+
116+
## Code Review Guidelines
117+
- Focus on code quality, architecture, and maintainability
118+
- Provide constructive feedback
119+
- Address all review comments before merging
120+
- Maintain a respectful and collaborative tone

frontend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_API_URL=http://localhost:8000
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
jobs:
9+
build_deploy:
10+
name: Build and Deploy
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: evoapicloud/evo-ai-frontend
24+
tags: type=semver,pattern=v{{version}}
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to GitHub Container Registry
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v5
41+
with:
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
47+
- name: Image digest
48+
run: echo ${{ steps.docker_build.outputs.digest }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
build_deploy:
10+
name: Build and Deploy
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: evoapicloud/evo-ai-frontend
24+
tags: homolog
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to Docker Hub
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v5
41+
with:
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
47+
- name: Image digest
48+
run: echo ${{ steps.docker_build.outputs.digest }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_deploy:
10+
name: Build and Deploy
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: evoapicloud/evo-ai-frontend
24+
tags: latest
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to Docker Hub
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v5
41+
with:
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
47+
- name: Image digest
48+
run: echo ${{ steps.docker_build.outputs.digest }}

frontend/.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# next.js
7+
/.next/
8+
/out/
9+
10+
# production
11+
/build
12+
13+
# debug
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
.pnpm-debug.log*
18+
19+
# Lock files
20+
package-lock.json
21+
yarn.lock
22+
23+
# env files
24+
.env
25+
26+
# vercel
27+
.vercel
28+
29+
# typescript
30+
*.tsbuildinfo
31+
next-env.d.ts

frontend/CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.0.7] - 2025-05-15
9+
10+
### Added
11+
12+
- Add Task agents
13+
- Add file support for A2A protocol (Agent-to-Agent) endpoints
14+
- Add entrypoint script for dynamic environment variable handling
15+
- Add agent card URL input and copy functionality
16+
17+
## [0.0.6] - 2025-05-13
18+
19+
### Added
20+
21+
- Agent sharing functionality with third parties via API keys
22+
- Dedicated shared-chat page for accessing shared agents
23+
- Local storage mechanism to save recently used shared agents
24+
- Public access to shared agents without full authentication
25+
26+
### Changed
27+
28+
- Add example environment file and update .gitignore
29+
- Add clientId prop to agent-related components and improve agent data processing
30+
- Refactor middleware to handle shared agent routes as public paths
31+
- Update API interceptors to prevent forced logout on shared chat pages
32+
33+
### security
34+
35+
- Implement force logout functionality on 401 Unauthorized responses
36+
37+
## [0.0.5] - 2025-05-13
38+
39+
### Changed
40+
41+
- Update author information in multiple files
42+
43+
## [0.0.4] - 2025-05-13
44+
45+
### Added
46+
- Initial public release
47+
- User-friendly interface for creating and managing AI agents
48+
- Integration with multiple language models (e.g., GPT-4, Claude)
49+
- Client management interface
50+
- Visual configuration for MCP servers
51+
- Custom tools management
52+
- JWT authentication with email verification
53+
- Agent 2 Agent (A2A) protocol support (Google's A2A spec)
54+
- Workflow Agent with ReactFlow for visual workflow creation
55+
- Secure API key management (encrypted storage)
56+
- Agent organization with folders and categories
57+
- Dashboard with agent overview, usage stats, and recent activities
58+
- Agent editor for creating, editing, and configuring agents
59+
- Workflow editor for building and visualizing agent flows
60+
- API key manager for adding, encrypting, and rotating keys
61+
- RESTful API and WebSocket backend integration
62+
- Docker support for containerized deployment
63+
- Complete documentation and contribution guidelines
64+
65+
---
66+
67+
Older versions and future releases will be listed here.

0 commit comments

Comments
 (0)