Skip to content

Commit 4ad9b92

Browse files
committed
feat: Complete Phase 0 - Next.js Foundation Setup
Initialize Next.js 15 project with complete foundation: - ✅ Next.js 15 with App Router and TypeScript 5 - ✅ Tailwind CSS v3 configuration (ready for v4) - ✅ shadcn/ui component system (Button, Card) - ✅ React Query for server state management - ✅ ServiceStack client integration with auth support - ✅ Copied existing dtos.ts from Nuxt.js project - ✅ Configured ESLint, Prettier, PostCSS - ✅ Created basic homepage with gradient hero - ✅ Set up API proxy configuration for backend - ✅ Production build successfully compiling Project structure: - src/app/ - Next.js pages and layouts - src/components/ui/ - Reusable UI components - src/lib/api/ - ServiceStack client setup - src/lib/utils/ - Utility functions First Load JS: 102 kB (optimized) Ready for Phase 1: Static Pages & Layouts
1 parent 2e9ff4a commit 4ad9b92

21 files changed

Lines changed: 11699 additions & 0 deletions

app-next/.eslintignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Auto-generated files
2+
src/lib/dtos.ts
3+
src/lib/dtos.js
4+
5+
# Build output
6+
.next
7+
out
8+
node_modules
9+
10+
# Generated types
11+
next-env.d.ts

app-next/.eslintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["next/core-web-vitals", "next/typescript"],
3+
"rules": {
4+
"@typescript-eslint/no-explicit-any": "warn",
5+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }]
6+
}
7+
}

app-next/.gitignore

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

app-next/.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"plugins": ["prettier-plugin-tailwindcss"]
8+
}

app-next/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# TechStacks - Next.js Migration
2+
3+
This is the modernized React + Next.js version of TechStacks, migrating from Nuxt.js + Vuetify.
4+
5+
## Tech Stack
6+
7+
- **Framework:** Next.js 15 with App Router
8+
- **Language:** TypeScript 5
9+
- **Styling:** Tailwind CSS v3+ (migrating to v4)
10+
- **UI Components:** shadcn/ui + Radix UI
11+
- **State Management:** React Query + Zustand
12+
- **Forms:** React Hook Form + Zod
13+
- **Backend:** ASP.NET Core + ServiceStack (unchanged)
14+
15+
## Getting Started
16+
17+
1. Install dependencies:
18+
```bash
19+
npm install
20+
```
21+
22+
2. Run the development server:
23+
```bash
24+
npm run dev
25+
```
26+
27+
3. Open [http://localhost:3000](http://localhost:3000) in your browser.
28+
29+
4. Make sure the backend is running on port 5000:
30+
```bash
31+
cd ../TechStacks
32+
dotnet run
33+
```
34+
35+
## Project Structure
36+
37+
```
38+
src/
39+
├── app/ # Next.js App Router pages
40+
│ ├── layout.tsx # Root layout
41+
│ ├── page.tsx # Homepage
42+
│ └── globals.css # Global styles
43+
├── components/
44+
│ └── ui/ # shadcn/ui components
45+
├── lib/
46+
│ ├── api/ # ServiceStack client & queries
47+
│ ├── utils/ # Utility functions
48+
│ └── dtos.ts # ServiceStack DTOs
49+
└── types/ # TypeScript type definitions
50+
```
51+
52+
## Migration Progress
53+
54+
- [x] Phase 0: Setup & Foundation
55+
- [ ] Phase 1: Static Pages & Layouts
56+
- [ ] Phase 2: Data Integration
57+
- [ ] Phase 3: Authentication
58+
- [ ] Phase 4: Forms & Creation
59+
- [ ] Phase 5: Social Features
60+
- [ ] Phase 6: Organizations
61+
- [ ] Phase 7: Moderation
62+
- [ ] Phase 8: Polish & Optimization
63+
- [ ] Phase 9: Testing & QA
64+
- [ ] Phase 10: Deployment
65+
66+
## Scripts
67+
68+
- `npm run dev` - Start development server
69+
- `npm run build` - Build for production
70+
- `npm run start` - Start production server
71+
- `npm run lint` - Run ESLint
72+
- `npm run format` - Format code with Prettier
73+
- `npm run type-check` - TypeScript type checking
74+
75+
## Learn More
76+
77+
- [Next.js Documentation](https://nextjs.org/docs)
78+
- [ServiceStack Documentation](https://docs.servicestack.net/)
79+
- [Tailwind CSS](https://tailwindcss.com/)
80+
- [shadcn/ui](https://ui.shadcn.com/)

app-next/next.config.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { NextConfig } from 'next'
2+
3+
const config: NextConfig = {
4+
reactStrictMode: true,
5+
6+
// API proxy to backend
7+
async rewrites() {
8+
const apiUrl = process.env.API_URL || 'http://localhost:5000'
9+
return [
10+
{
11+
source: '/api/:path*',
12+
destination: `${apiUrl}/api/:path*`,
13+
},
14+
{
15+
source: '/auth/:path*',
16+
destination: `${apiUrl}/auth/:path*`,
17+
},
18+
{
19+
source: '/users/:userId/avatar',
20+
destination: `${apiUrl}/users/:userId/avatar`,
21+
},
22+
]
23+
},
24+
25+
images: {
26+
remotePatterns: [
27+
{
28+
protocol: 'https',
29+
hostname: 'techstacks.io',
30+
},
31+
{
32+
protocol: 'https',
33+
hostname: 'cdn.techstacks.io',
34+
},
35+
],
36+
formats: ['image/avif', 'image/webp'],
37+
},
38+
39+
// Environment variables
40+
env: {
41+
NEXT_PUBLIC_API_URL: process.env.API_URL || 'http://localhost:5000',
42+
},
43+
}
44+
45+
export default config

0 commit comments

Comments
 (0)