create-nene 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +87 -52
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/templates/default/.cursor/rules/backend-patterns.mdc +68 -0
  6. package/templates/default/.cursor/rules/frontend-patterns.mdc +53 -0
  7. package/templates/default/.cursor/rules/nene-architecture.mdc +65 -0
  8. package/templates/default/.cursor/rules/shared-package.mdc +68 -0
  9. package/templates/default/.cursor/rules/task-management.mdc +60 -0
  10. package/templates/default/README.md +42 -25
  11. package/templates/default/_gitignore +10 -17
  12. package/templates/default/apps/api/nest-cli.json +8 -0
  13. package/templates/default/apps/api/package.json +36 -0
  14. package/templates/default/apps/api/src/app.controller.ts +12 -0
  15. package/templates/default/apps/api/src/app.module.ts +19 -0
  16. package/templates/default/apps/api/src/app.service.ts +8 -0
  17. package/templates/default/apps/api/src/config/configuration.ts +6 -0
  18. package/templates/default/apps/api/src/health/health.controller.ts +12 -0
  19. package/templates/default/apps/api/src/health/health.module.ts +9 -0
  20. package/templates/default/apps/api/src/health/health.service.ts +12 -0
  21. package/templates/default/apps/api/src/main.ts +32 -0
  22. package/templates/default/apps/api/tsconfig.json +26 -0
  23. package/templates/default/apps/web/next.config.ts +7 -0
  24. package/templates/default/apps/web/package.json +28 -0
  25. package/templates/default/apps/web/postcss.config.mjs +9 -0
  26. package/templates/default/apps/web/src/app/globals.css +20 -0
  27. package/templates/default/apps/web/src/app/layout.tsx +19 -0
  28. package/templates/default/apps/web/src/app/page.tsx +75 -0
  29. package/templates/default/apps/web/tailwind.config.ts +15 -0
  30. package/templates/default/{tsconfig.json → apps/web/tsconfig.json} +11 -8
  31. package/templates/default/docs/API.md +55 -0
  32. package/templates/default/docs/ARCHITECTURE.md +56 -0
  33. package/templates/default/docs/PROGRESS.md +40 -0
  34. package/templates/default/package.json +12 -17
  35. package/templates/default/packages/shared/package.json +29 -0
  36. package/templates/default/packages/shared/src/constants/index.ts +13 -0
  37. package/templates/default/packages/shared/src/index.ts +3 -0
  38. package/templates/default/packages/shared/src/types/index.ts +21 -0
  39. package/templates/default/packages/shared/tsconfig.json +17 -0
  40. package/templates/default/packages/shared/tsup.config.ts +10 -0
  41. package/templates/default/pnpm-workspace.yaml +3 -0
  42. package/templates/default/turbo.json +14 -0
  43. package/templates/default/eslint.config.mjs +0 -10
  44. package/templates/default/src/app/layout.tsx +0 -14
  45. package/templates/default/src/app/page.tsx +0 -29
  46. package/templates/default/src/server/api/hello.ts +0 -14
  47. package/templates/default/src/server/index.ts +0 -3
  48. package/templates/minimal/README.md +0 -11
  49. package/templates/minimal/_gitignore +0 -6
  50. package/templates/minimal/package.json +0 -22
  51. package/templates/minimal/src/app/layout.tsx +0 -9
  52. package/templates/minimal/src/app/page.tsx +0 -7
  53. package/templates/minimal/tsconfig.json +0 -19
@@ -0,0 +1,40 @@
1
+ # Project Progress
2
+
3
+ This document tracks the development progress for AI agents and developers.
4
+
5
+ ## Completed
6
+
7
+ - [x] Project scaffolding with Turborepo
8
+ - [x] Next.js frontend setup
9
+ - [x] NestJS backend setup
10
+ - [x] Shared package for types and constants
11
+ - [x] Health check endpoint
12
+ - [x] Basic CORS configuration
13
+ - [x] Request validation with class-validator
14
+
15
+ ## In Progress
16
+
17
+ - [ ] Database integration
18
+ - [ ] Authentication system
19
+ - [ ] User management
20
+
21
+ ## Planned
22
+
23
+ - [ ] API documentation (Swagger)
24
+ - [ ] Unit tests
25
+ - [ ] E2E tests
26
+ - [ ] CI/CD pipeline
27
+ - [ ] Docker setup
28
+ - [ ] Production deployment
29
+
30
+ ## Known Issues
31
+
32
+ None at this time.
33
+
34
+ ## Notes for AI Agents
35
+
36
+ When making changes:
37
+ 1. Check this file for current status
38
+ 2. Update PROGRESS.md after completing tasks
39
+ 3. Follow the patterns in ARCHITECTURE.md
40
+ 4. Keep API.md updated with new endpoints
@@ -1,24 +1,19 @@
1
1
  {
2
2
  "name": "my-nene-app",
3
- "version": "0.1.0",
4
3
  "private": true,
5
- "type": "module",
4
+ "workspaces": [
5
+ "apps/*",
6
+ "packages/*"
7
+ ],
6
8
  "scripts": {
7
- "dev": "nene dev",
8
- "build": "nene build",
9
- "start": "nene start",
10
- "lint": "eslint ."
11
- },
12
- "dependencies": {
13
- "nene": "^0.1.0",
14
- "react": "^19.0.0",
15
- "react-dom": "^19.0.0"
9
+ "dev": "turbo run dev",
10
+ "build": "turbo run build",
11
+ "lint": "turbo run lint",
12
+ "dev:web": "turbo run dev --filter=@app/web",
13
+ "dev:api": "turbo run dev --filter=@app/api"
16
14
  },
17
15
  "devDependencies": {
18
- "@types/node": "^22.0.0",
19
- "@types/react": "^19.0.0",
20
- "@types/react-dom": "^19.0.0",
21
- "eslint": "^9.0.0",
22
- "typescript": "^5.7.0"
23
- }
16
+ "turbo": "^2.0.0"
17
+ },
18
+ "packageManager": "pnpm@9.0.0"
24
19
  }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@app/shared",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "scripts": {
17
+ "build": "tsup",
18
+ "dev": "tsup --watch"
19
+ },
20
+ "dependencies": {
21
+ "class-transformer": "^0.5.1",
22
+ "class-validator": "^0.14.1"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^22.0.0",
26
+ "tsup": "^8.0.0",
27
+ "typescript": "^5.7.0"
28
+ }
29
+ }
@@ -0,0 +1,13 @@
1
+ // API Routes - shared between frontend and backend
2
+ export const API_ROUTES = {
3
+ HEALTH: '/api/health',
4
+ AUTH: {
5
+ LOGIN: '/api/auth/login',
6
+ REGISTER: '/api/auth/register',
7
+ LOGOUT: '/api/auth/logout',
8
+ },
9
+ USERS: {
10
+ BASE: '/api/users',
11
+ BY_ID: (id: string) => `/api/users/${id}`,
12
+ },
13
+ } as const;
@@ -0,0 +1,3 @@
1
+ // Re-export all modules
2
+ export * from './types';
3
+ export * from './constants';
@@ -0,0 +1,21 @@
1
+ // Common types shared between frontend and backend
2
+
3
+ export interface User {
4
+ id: string;
5
+ email: string;
6
+ name: string | null;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ }
10
+
11
+ export interface ApiResponse<T> {
12
+ success: boolean;
13
+ data?: T;
14
+ error?: string;
15
+ }
16
+
17
+ export interface HealthStatus {
18
+ status: 'ok' | 'error';
19
+ timestamp: string;
20
+ uptime?: number;
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2021",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "declaration": true,
7
+ "emitDecoratorMetadata": true,
8
+ "experimentalDecorators": true,
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "esModuleInterop": true,
12
+ "outDir": "./dist",
13
+ "rootDir": "./src"
14
+ },
15
+ "include": ["src/**/*"],
16
+ "exclude": ["node_modules", "dist"]
17
+ }
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'tsup';
2
+
3
+ export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ format: ['cjs', 'esm'],
6
+ dts: true,
7
+ splitting: false,
8
+ sourcemap: true,
9
+ clean: true,
10
+ });
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - "apps/*"
3
+ - "packages/*"
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "tasks": {
4
+ "build": {
5
+ "dependsOn": ["^build"],
6
+ "outputs": ["dist/**", ".next/**"]
7
+ },
8
+ "dev": {
9
+ "cache": false,
10
+ "persistent": true
11
+ },
12
+ "lint": {}
13
+ }
14
+ }
@@ -1,10 +0,0 @@
1
- import js from "@eslint/js";
2
- import tseslint from "typescript-eslint";
3
-
4
- export default tseslint.config(
5
- js.configs.recommended,
6
- ...tseslint.configs.recommended,
7
- {
8
- ignores: ["node_modules/", "dist/", ".nene/"],
9
- }
10
- );
@@ -1,14 +0,0 @@
1
- import type { ReactNode } from "react";
2
-
3
- export const metadata = {
4
- title: "My Nene App",
5
- description: "Built with nene.js - The AI-native full-stack framework",
6
- };
7
-
8
- export default function RootLayout({ children }: { children: ReactNode }) {
9
- return (
10
- <html lang="en">
11
- <body>{children}</body>
12
- </html>
13
- );
14
- }
@@ -1,29 +0,0 @@
1
- export default function HomePage() {
2
- return (
3
- <main className="min-h-screen flex flex-col items-center justify-center p-8">
4
- <div className="max-w-2xl text-center">
5
- <h1 className="text-4xl font-bold mb-4">
6
- Welcome to <span className="text-blue-500">nene.js</span>
7
- </h1>
8
- <p className="text-lg text-gray-600 mb-8">
9
- The AI-native full-stack framework for building modern web
10
- applications.
11
- </p>
12
- <div className="flex gap-4 justify-center">
13
- <a
14
- href="https://nene.js.org/docs"
15
- className="px-6 py-3 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition"
16
- >
17
- Read the Docs
18
- </a>
19
- <a
20
- href="https://github.com/nene-js/nene"
21
- className="px-6 py-3 border border-gray-300 rounded-lg hover:border-gray-400 transition"
22
- >
23
- GitHub
24
- </a>
25
- </div>
26
- </div>
27
- </main>
28
- );
29
- }
@@ -1,14 +0,0 @@
1
- import { Controller, Get } from "nene/decorators";
2
-
3
- @Controller("/api")
4
- export class HelloController {
5
- @Get("/hello")
6
- hello() {
7
- return { message: "Hello from nene.js!" };
8
- }
9
-
10
- @Get("/health")
11
- health() {
12
- return { status: "ok", timestamp: new Date().toISOString() };
13
- }
14
- }
@@ -1,3 +0,0 @@
1
- // Server entry point
2
- // Import your controllers here
3
- export * from "./api/hello";
@@ -1,11 +0,0 @@
1
- # My Nene App
2
-
3
- Minimal [nene.js](https://nene.js.org) project.
4
-
5
- ## Quick Start
6
-
7
- ```bash
8
- npm run dev
9
- ```
10
-
11
- Open [http://localhost:3000](http://localhost:3000) in your browser.
@@ -1,6 +0,0 @@
1
- node_modules/
2
- dist/
3
- .nene/
4
- .env
5
- .env.local
6
- *.log
@@ -1,22 +0,0 @@
1
- {
2
- "name": "my-nene-app",
3
- "version": "0.1.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "nene dev",
8
- "build": "nene build",
9
- "start": "nene start"
10
- },
11
- "dependencies": {
12
- "nene": "^0.1.0",
13
- "react": "^19.0.0",
14
- "react-dom": "^19.0.0"
15
- },
16
- "devDependencies": {
17
- "@types/node": "^22.0.0",
18
- "@types/react": "^19.0.0",
19
- "@types/react-dom": "^19.0.0",
20
- "typescript": "^5.7.0"
21
- }
22
- }
@@ -1,9 +0,0 @@
1
- import type { ReactNode } from "react";
2
-
3
- export default function RootLayout({ children }: { children: ReactNode }) {
4
- return (
5
- <html lang="en">
6
- <body>{children}</body>
7
- </html>
8
- );
9
- }
@@ -1,7 +0,0 @@
1
- export default function HomePage() {
2
- return (
3
- <main>
4
- <h1>Hello, nene.js!</h1>
5
- </main>
6
- );
7
- }
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": ["dom", "dom.iterable", "ES2022"],
5
- "allowJs": true,
6
- "skipLibCheck": true,
7
- "strict": true,
8
- "noEmit": true,
9
- "esModuleInterop": true,
10
- "module": "ESNext",
11
- "moduleResolution": "bundler",
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "jsx": "react-jsx",
15
- "incremental": true
16
- },
17
- "include": ["src/**/*"],
18
- "exclude": ["node_modules"]
19
- }