{"id":30446981,"url":"https://github.com/tencentedgeone/koa-template","last_synced_at":"2025-08-23T11:21:09.229Z","repository":{"id":311134920,"uuid":"1042444328","full_name":"TencentEdgeOne/koa-template","owner":"TencentEdgeOne","description":"A demonstration website for function requests developed with Next.js + Tailwind CSS + shadcn/ui technology stack, showcasing how to deploy and run Node Functions based on the Koa framework on EdgeOne Pages.","archived":false,"fork":false,"pushed_at":"2025-08-22T09:12:50.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-22T11:30:28.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TencentEdgeOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-22T03:09:54.000Z","updated_at":"2025-08-22T09:12:53.000Z","dependencies_parsed_at":"2025-08-22T11:32:18.990Z","dependency_job_id":"d7720c76-b4eb-4275-b788-d1a21d9cb980","html_url":"https://github.com/TencentEdgeOne/koa-template","commit_stats":null,"previous_names":["tencentedgeone/koa-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TencentEdgeOne/koa-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fkoa-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fkoa-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fkoa-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fkoa-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TencentEdgeOne","download_url":"https://codeload.github.com/TencentEdgeOne/koa-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentEdgeOne%2Fkoa-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746793,"owners_count":24813586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-23T11:21:06.856Z","updated_at":"2025-08-23T11:21:09.216Z","avatar_url":"https://github.com/TencentEdgeOne.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Functions on EdgeOne Pages - Koa Demo Website\n\nA demonstration website for function requests developed with Next.js + Tailwind CSS + shadcn/ui technology stack, showcasing how to deploy and run Node Functions based on the Koa framework on EdgeOne Pages.\n\n## 🚀 Features\n\n- **Modern UI Design**：Adopting a black background with white text theme, using #1c66e5 as the accent color\n- **Responsive Layout**：Supporting desktop and mobile devices, providing the best user experience\n- **Real-time API Demo**：Integrating Express backend, supporting real-time function call testing\n- **Componentized Architecture**：Using shadcn/ui style component system\n- **TypeScript Support**：Complete type definitions and type safety\n\n## 🛠️ Technology Stack\n\n### Frontend\n- **Next.js 15** - React full-stack framework\n- **React 19** - User interface library\n- **TypeScript** - Type-safe JavaScript\n- **Tailwind CSS 4** - Utility-first CSS framework\n\n### UI Components\n- **shadcn/ui** - High-quality React components\n- **Lucide React** - Beautiful icon library\n- **class-variance-authority** - Component style variant management\n- **clsx \u0026 tailwind-merge** - CSS class name merging tool\n\n### Backend\n- **Express.js** - Node.js Web application framework\n- **Node Functions** - EdgeOne Pages serverless function\n\n## 📁 Project Structure\n\n```\nexpress-template/\n├── src/\n│   ├── app/                 # Next.js App Router\n│   │   ├── globals.css     # Global styles\n│   │   ├── layout.tsx      # Root layout\n│   │   └── page.tsx        # Main page\n│   ├── components/         # React components\n│   │   └── ui/            # UI basic components\n│   │       ├── button.tsx  # Button component\n│   │       └── card.tsx    # Card component\n│   └── lib/               # Utility functions\n│       └── utils.ts       # General utilities\n├── public/                # Static resources\n├── package.json           # Project configuration\n└── README.md             # Project documentation\n```\n\n## 🚀 Quick Start\n\n### Environment Requirements\n\n- Node.js 18+ \n- npm or yarn\n\n### Install Dependencies\n\n```bash\nnpm install\n# or\nyarn install\n```\n\n### Development Mode\n\n```bash\nedgeone pages dev\n```\n\nAccess [http://localhost:8088](http://localhost:8088) to view the application.\n\n### Build Production Version\n\n```bash\nedgeone pages build\n```\n\n## 🎯 Core Features\n\n### 1. Main Page Display\n- Project title and description\n- One-click deployment and documentation view button\n- Express code example display\n\n### 2. API Call Demo\n- Real-time function call testing\n- Loading status display\n- Result display\n\n### 3. Responsive Design\n- Mobile-friendly layout\n- Adaptive component sizing\n- Touch-friendly interaction\n\n## 🔧 Configuration Explanation\n\n### Tailwind CSS Configuration\nThe project uses Tailwind CSS 4, supporting custom color variables:\n\n```css\n:root {\n  --primary: #1c66e5;        /* Primary color */\n  --background: #000000;     /* Background color */\n  --foreground: #ffffff;     /* Foreground color */\n}\n```\n\n### Component Style\nUsing `class-variance-authority` to manage component style variants, supporting multiple preset styles.\n\n## 📚 Documentation Entry\n\n- **EdgeOne Pages Official Documentation**：[https://docs.edgeone.com](https://docs.edgeone.com)\n- **Next.js Documentation**：[https://nextjs.org/docs](https://nextjs.org/docs)\n- **Tailwind CSS Documentation**：[https://tailwindcss.com/docs](https://tailwindcss.com/docs)\n- **Express.js Documentation**：[https://expressjs.com](https://expressjs.com)\n\n## 🚀 Deployment Guide\n\n### EdgeOne Pages Deployment\n\n1. Push the code to a GitHub repository\n2. Create a new project in the EdgeOne Pages console\n3. Select the GitHub repository as the source\n4. Configure the build command: `npm run build`\n5. Configure the output directory: `.next`\n6. Deploy the project\n\n### Node Functions Configuration\n\nCreate a `node-functions/` folder in the project root directory, adding an Express application:\n\n```javascript\n// node-functions/express/[[default]].js\nimport express from \"express\";\nconst app = express();\n\napp.get(\"/\", (req, res) =\u003e {\n  res.json({ message: \"Hello from Express on Node Functions!\" });\n});\n\nexport default app;\n```\n\n\n## Deployment\n\n[![Deploy with EdgeOne Pages](https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg)](https://edgeone.ai/pages/new?from=github\u0026template=koa-template)\n\n\n## 📄 License\n\nThis project uses the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentedgeone%2Fkoa-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencentedgeone%2Fkoa-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentedgeone%2Fkoa-template/lists"}