CEO OS
++ Scaffold initial — conectat la ceo-api si Supabase, stilizat cu Tailwind. +
+diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..3764ddb --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +NEXT_PUBLIC_SUPABASE_URL=http://supabasekong-to6mg3yxqit4ac9nl0otnvav.152.53.112.35.sslip.io:8000 +NEXT_PUBLIC_SUPABASE_ANON_KEY= +NEXT_PUBLIC_API_URL=http://ceo-api:3000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7cfe70 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +.next/ +.env +*.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..701a321 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:22-alpine AS build +WORKDIR /app +COPY package.json ./ +RUN npm install +COPY . . +RUN npm run build + +FROM node:22-alpine +WORKDIR /app +ENV NODE_ENV=production +COPY --from=build /app/public ./public +COPY --from=build /app/.next/standalone ./ +COPY --from=build /app/.next/static ./.next/static +EXPOSE 3000 +CMD ["node", "server.js"] diff --git a/README.md b/README.md index 1c88d6f..ee1c27d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # ceo-web +Frontend Next.js pentru CEO-OS. + +## Stack + +Next.js (App Router) + TypeScript, Tailwind CSS, TanStack Query, React Hook Form + Zod, Supabase JS, date-fns, Recharts. + +## Dezvoltare + +```bash +npm install +cp .env.example .env +npm run dev +``` + +`GET /api/health` returneaza statusul serviciului. diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..b408897 --- /dev/null +++ b/next.config.js @@ -0,0 +1,6 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + output: 'standalone', +}; + +module.exports = nextConfig; diff --git a/package.json b/package.json new file mode 100644 index 0000000..642c049 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "ceo-web", + "version": "0.1.0", + "description": "CEO-OS web frontend (Next.js)", + "private": true, + "license": "UNLICENSED", + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@hookform/resolvers": "^3.9.1", + "@supabase/supabase-js": "^2.47.0", + "@tanstack/react-query": "^5.62.0", + "date-fns": "^4.1.0", + "next": "^15.1.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-hook-form": "^7.54.0", + "recharts": "^2.13.3", + "zod": "^3.23.8" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.15", + "typescript": "^5.6.0" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..12a703d --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/src/app/api/health/route.ts b/src/app/api/health/route.ts new file mode 100644 index 0000000..a34781a --- /dev/null +++ b/src/app/api/health/route.ts @@ -0,0 +1,5 @@ +import { NextResponse } from 'next/server'; + +export function GET() { + return NextResponse.json({ status: 'ok', service: 'ceo-web' }); +} diff --git a/src/app/globals.css b/src/app/globals.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/src/app/globals.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/src/app/layout.tsx b/src/app/layout.tsx new file mode 100644 index 0000000..7753352 --- /dev/null +++ b/src/app/layout.tsx @@ -0,0 +1,18 @@ +import type { Metadata } from 'next'; +import { Providers } from './providers'; +import './globals.css'; + +export const metadata: Metadata = { + title: 'CEO OS', + description: 'Sistem complex pentru antreprenori', +}; + +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + +
++ Scaffold initial — conectat la ceo-api si Supabase, stilizat cu Tailwind. +
+