Skip to content

Commit c4b8492

Browse files
author
AI Assistant
committed
Implement Step 3: Complete Web Platform Structure
- Created Next.js 14 app with App Router structure - Added Hero UI components and configuration - Implemented Supabase integration for articles and auth - Created API routes for articles, webhooks, and analytics - Added comprehensive component library with TypeScript - Configured Tailwind CSS, ESLint, Prettier, and TypeScript - Implemented custom hooks for articles, analytics, and auth - Added contexts for authentication and theme management - Created proper project structure following reposetup.md Step 3
1 parent 136f207 commit c4b8492

61 files changed

Lines changed: 1865 additions & 3 deletions

Some content is hidden

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

reposetup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Add appropriate TypeScript interfaces and placeholder components with basic stru
262262
**Note**: Advanced migration scripts (rollbacks, multi-environment deployments, CI database hooks) are planned for later sprints once core functionality is established.
263263
```
264264
265-
### Step 5: Create Shared Directory Structure
265+
### Step 4: Create Shared Directory Structure
266266
267267
**Prompt for Cursor:**
268268
```
@@ -298,7 +298,7 @@ shared/
298298
Add basic TypeScript interfaces and SQL table definitions as placeholders.
299299
```
300300
301-
### Step 6: Create Documentation Structure
301+
### Step 5: Create Documentation Structure
302302
303303
**Prompt for Cursor:**
304304
```
@@ -340,7 +340,7 @@ Add placeholder content in each markdown file describing what should be document
340340
- **Architecture Decision Records** (`docs/architecture/adr/`): Maintain ADRs to capture why key choices (Chainlit vs Streamlit, Supabase vs Firebase, etc.) were made for future reference and onboarding
341341
```
342342
343-
### Step 7: Create Scripts and Configuration
343+
### Step 6: Create Scripts and Configuration
344344
345345
**Prompt for Cursor:**
346346
```

web/.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": [
3+
"next/core-web-vitals",
4+
"prettier"
5+
],
6+
"rules": {
7+
"@next/next/no-html-link-for-pages": "off",
8+
"react/jsx-key": "error",
9+
"react/no-unescaped-entities": "warn"
10+
}
11+
}

web/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hoist-pattern[]=*@heroui*
2+
auto-install-peers=true

web/.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
.next
3+
.vercel
4+
dist
5+
build
6+
*.log
7+
.env*
8+
.git

web/.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true,
8+
"arrowParens": "always"
9+
}

web/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:18-alpine
2+
3+
WORKDIR /app
4+
5+
# Copy package files
6+
COPY package*.json ./
7+
RUN npm ci
8+
9+
# Copy source code
10+
COPY . .
11+
12+
EXPOSE 3000
13+
14+
CMD ["npm", "run", "dev"]

web/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Web Platform - Sport Scribe
2+
3+
## Overview
4+
Next.js web platform for publishing and managing AI-generated sports articles.
5+
6+
## Tech Stack
7+
- Next.js 14 with App Router
8+
- TypeScript
9+
- Tailwind CSS + Hero UI
10+
- Supabase (Database & Auth)
11+
- Framer Motion (for animations)
12+
13+
## Setup
14+
```bash
15+
# Install dependencies
16+
npm install
17+
18+
# Set up environment variables
19+
cp .env.local.example .env.local
20+
# Edit .env.local with your Supabase credentials
21+
22+
# Run development server
23+
npm run dev
24+
```
25+
26+
## Hero UI Configuration
27+
This project uses Hero UI for components. Key files:
28+
- `app/providers.tsx` - Hero UI provider setup
29+
- `tailwind.config.js` - Hero UI plugin configuration
30+
- `.npmrc` - pnpm hoisting configuration (if using pnpm)
31+
32+
## Features
33+
- Real-time article publishing
34+
- Admin dashboard
35+
- Article management
36+
- Analytics and monitoring

web/app/admin/analytics/page.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { Card, CardBody, CardHeader } from '@heroui/react'
2+
3+
export default function AdminAnalyticsPage() {
4+
return (
5+
<div className="container mx-auto px-4 py-8">
6+
<h1 className="text-3xl font-bold mb-8">Analytics Dashboard</h1>
7+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
8+
<Card>
9+
<CardHeader>
10+
<h3 className="text-lg font-semibold">Article Performance</h3>
11+
</CardHeader>
12+
<CardBody>
13+
<p>Views, engagement, and performance metrics</p>
14+
</CardBody>
15+
</Card>
16+
<Card>
17+
<CardHeader>
18+
<h3 className="text-lg font-semibold">AI Agent Status</h3>
19+
</CardHeader>
20+
<CardBody>
21+
<p>Monitoring AI agent performance and health</p>
22+
</CardBody>
23+
</Card>
24+
<Card>
25+
<CardHeader>
26+
<h3 className="text-lg font-semibold">User Engagement</h3>
27+
</CardHeader>
28+
<CardBody>
29+
<p>User interaction and platform usage statistics</p>
30+
</CardBody>
31+
</Card>
32+
</div>
33+
</div>
34+
)
35+
}

web/app/admin/articles/page.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Card, CardBody, CardHeader, Button } from '@heroui/react'
2+
3+
export default function AdminArticlesPage() {
4+
return (
5+
<div className="container mx-auto px-4 py-8">
6+
<h1 className="text-3xl font-bold mb-8">Article Management</h1>
7+
<div className="mb-6">
8+
<Button color="primary">Generate New Article</Button>
9+
</div>
10+
<Card>
11+
<CardHeader>
12+
<h3 className="text-lg font-semibold">Recent Articles</h3>
13+
</CardHeader>
14+
<CardBody>
15+
<p>This is a placeholder for the article management interface.</p>
16+
<p className="mt-2 text-gray-600">
17+
Features will include: article status, editing, publishing controls, and AI agent monitoring.
18+
</p>
19+
</CardBody>
20+
</Card>
21+
</div>
22+
)
23+
}

web/app/admin/page.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Card, CardBody, CardHeader, Button } from '@heroui/react'
2+
import Link from 'next/link'
3+
4+
export default function AdminPage() {
5+
return (
6+
<div className="container mx-auto px-4 py-8">
7+
<h1 className="text-3xl font-bold mb-8">Admin Dashboard</h1>
8+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
9+
<Card>
10+
<CardHeader>
11+
<h3 className="text-lg font-semibold">Article Management</h3>
12+
</CardHeader>
13+
<CardBody>
14+
<p className="mb-4">Manage AI-generated articles</p>
15+
<Button as={Link} href="/admin/articles" color="primary" size="sm">
16+
Manage Articles
17+
</Button>
18+
</CardBody>
19+
</Card>
20+
<Card>
21+
<CardHeader>
22+
<h3 className="text-lg font-semibold">Analytics</h3>
23+
</CardHeader>
24+
<CardBody>
25+
<p className="mb-4">View platform analytics</p>
26+
<Button as={Link} href="/admin/analytics" color="primary" size="sm">
27+
View Analytics
28+
</Button>
29+
</CardBody>
30+
</Card>
31+
</div>
32+
</div>
33+
)
34+
}

0 commit comments

Comments
 (0)