auto commit
This commit is contained in:
parent
a2cfadfba6
commit
fb6309cf79
62
.env.development
Normal file
62
.env.development
Normal file
@ -0,0 +1,62 @@
|
||||
# .env.development
|
||||
# Development environment configuration
|
||||
|
||||
# Common
|
||||
NODE_ENV=development
|
||||
TZ=Asia/Seoul
|
||||
|
||||
# Frontend
|
||||
NEXT_PUBLIC_API_URL=http://localhost:3001
|
||||
NEXT_PUBLIC_MQTT_URL=ws://localhost:1883
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
NEXTAUTH_SECRET=your-development-secret
|
||||
|
||||
# Backend API
|
||||
API_PORT=3001
|
||||
API_PREFIX=/api/v1
|
||||
CORS_ORIGIN=http://localhost:3000
|
||||
JWT_SECRET=your-jwt-secret-dev
|
||||
JWT_EXPIRES_IN=1d
|
||||
|
||||
# Database
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DB=fems_dev
|
||||
POSTGRES_USER=fems_user
|
||||
POSTGRES_PASSWORD=fems_password
|
||||
|
||||
# TimescaleDB
|
||||
TIMESCALEDB_HOST=timescaledb
|
||||
TIMESCALEDB_PORT=5432
|
||||
TIMESCALEDB_DB=fems_timeseries_dev
|
||||
TIMESCALEDB_USER=fems_tsdb_user
|
||||
TIMESCALEDB_PASSWORD=fems_tsdb_password
|
||||
|
||||
# Redis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=redis_password_dev
|
||||
|
||||
# MQTT Broker
|
||||
MQTT_PORT=1883
|
||||
MQTT_WS_PORT=9001
|
||||
MQTT_USERNAME=mqtt_user
|
||||
MQTT_PASSWORD=mqtt_password_dev
|
||||
|
||||
# Kafka
|
||||
KAFKA_BROKER=kafka:9092
|
||||
KAFKA_TOPIC_PREFIX=fems_dev
|
||||
|
||||
# Node-RED
|
||||
NODERED_PORT=1880
|
||||
NODERED_CREDENTIAL_SECRET=nodered_secret_dev
|
||||
|
||||
# Monitoring
|
||||
PROMETHEUS_PORT=9090
|
||||
GRAFANA_PORT=3100
|
||||
|
||||
# Log Management
|
||||
ELASTICSEARCH_HOST=elasticsearch
|
||||
ELASTICSEARCH_PORT=9200
|
||||
KIBANA_PORT=5601
|
||||
|
73
.env.production
Normal file
73
.env.production
Normal file
@ -0,0 +1,73 @@
|
||||
# .env.production
|
||||
# Production environment configuration
|
||||
|
||||
# Common
|
||||
NODE_ENV=production
|
||||
TZ=Asia/Seoul
|
||||
|
||||
# Traefik Settings
|
||||
DOMAIN=fems.com
|
||||
TRAEFIK_NETWORK=toktork_server_default
|
||||
ADMIN_SUBDOMAIN=admin.${DOMAIN}
|
||||
APP_SUBDOMAIN=app.${DOMAIN}
|
||||
API_SUBDOMAIN=api.${DOMAIN}
|
||||
MQTT_SUBDOMAIN=mqtt.${DOMAIN}
|
||||
NODERED_SUBDOMAIN=nodered.${DOMAIN}
|
||||
PROMETHEUS_SUBDOMAIN=prometheus.${DOMAIN}
|
||||
GRAFANA_SUBDOMAIN=grafana.${DOMAIN}
|
||||
KIBANA_SUBDOMAIN=kibana.${DOMAIN}
|
||||
|
||||
# Frontend
|
||||
NEXT_PUBLIC_API_URL=https://api.fems.com
|
||||
NEXT_PUBLIC_MQTT_URL=wss://mqtt.fems.com
|
||||
NEXTAUTH_URL=https://fems.com
|
||||
NEXTAUTH_SECRET=your-production-secret
|
||||
|
||||
# Backend API
|
||||
API_PORT=3001
|
||||
API_PREFIX=/api/v1
|
||||
CORS_ORIGIN=https://fems.com
|
||||
JWT_SECRET=your-jwt-secret-prod
|
||||
JWT_EXPIRES_IN=1d
|
||||
|
||||
# Database
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DB=fems_prod
|
||||
POSTGRES_USER=fems_user
|
||||
POSTGRES_PASSWORD=your-secure-password
|
||||
|
||||
# TimescaleDB
|
||||
TIMESCALEDB_HOST=timescaledb
|
||||
TIMESCALEDB_PORT=5432
|
||||
TIMESCALEDB_DB=fems_timeseries_prod
|
||||
TIMESCALEDB_USER=fems_tsdb_user
|
||||
TIMESCALEDB_PASSWORD=your-secure-tsdb-password
|
||||
|
||||
# Redis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=your-secure-redis-password
|
||||
|
||||
# MQTT Broker
|
||||
MQTT_PORT=1883
|
||||
MQTT_WS_PORT=9001
|
||||
MQTT_USERNAME=mqtt_user
|
||||
MQTT_PASSWORD=your-secure-mqtt-password
|
||||
|
||||
# Kafka
|
||||
KAFKA_BROKER=kafka:9092
|
||||
KAFKA_TOPIC_PREFIX=fems_prod
|
||||
|
||||
# Node-RED
|
||||
NODERED_PORT=1880
|
||||
NODERED_CREDENTIAL_SECRET=your-secure-nodered-secret
|
||||
|
||||
# Monitoring
|
||||
PROMETHEUS_PORT=9090
|
||||
GRAFANA_PORT=3100
|
||||
|
||||
# Log Management
|
||||
ELASTICSEARCH_HOST=elasticsearch
|
||||
ELASTICSEARCH_PORT=9200
|
||||
KIBANA_PORT=5601
|
@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 환경 설정 파일 복사
|
||||
cp .env-ser .env
|
||||
|
||||
# Git 변경사항 커밋 및 푸시
|
||||
git add .
|
||||
git commit -am "auto commit"
|
||||
@ -72,7 +69,6 @@ git push origin $new_branch
|
||||
git status
|
||||
|
||||
# .env-dev 파일을 .env로 복사하여 원래 상태로 복원
|
||||
cp .env-dev .env
|
||||
|
||||
# docker-compose -f docker-compose-dev.yml up -d --build
|
||||
|
||||
|
93
docker-compose.base.yml
Normal file
93
docker-compose.base.yml
Normal file
@ -0,0 +1,93 @@
|
||||
# docker-compose.base.yml
|
||||
# 기본 서비스 정의 (공통 설정)
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
fems-admin:
|
||||
build:
|
||||
context: ./fems-admin
|
||||
target: ${NODE_ENV:-development}
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
volumes:
|
||||
- ./fems-admin:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=${NODE_ENV:-development}
|
||||
env_file:
|
||||
- .env.${NODE_ENV:-development}
|
||||
depends_on:
|
||||
- fems-api
|
||||
|
||||
fems-app:
|
||||
build:
|
||||
context: ./fems-app
|
||||
target: ${NODE_ENV:-development}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./fems-app:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=${NODE_ENV:-development}
|
||||
env_file:
|
||||
- .env.${NODE_ENV:-development}
|
||||
depends_on:
|
||||
- fems-api
|
||||
|
||||
fems-api:
|
||||
build:
|
||||
context: ./fems-api
|
||||
target: ${NODE_ENV:-development}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./fems-api:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=${NODE_ENV:-development}
|
||||
env_file:
|
||||
- .env.${NODE_ENV:-development}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./backups/postgres:/backups
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
command: redis-server --requirepass ${REDIS_PASSWORD}
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
- ./backups/redis:/backups
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
42
docker-compose.dev.yml
Normal file
42
docker-compose.dev.yml
Normal file
@ -0,0 +1,42 @@
|
||||
# docker-compose.dev.yml
|
||||
# 개발 환경 설정
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
fems-admin:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
command: npm run dev
|
||||
environment:
|
||||
- NEXT_WEBPACK_USEPOLLING=1
|
||||
- WATCHPACK_POLLING=true
|
||||
# 개발 환경에서는 healthcheck 비활성화
|
||||
healthcheck:
|
||||
disable: true
|
||||
|
||||
fems-app:
|
||||
ports:
|
||||
- "3002:3000"
|
||||
command: npm run dev
|
||||
environment:
|
||||
- NEXT_WEBPACK_USEPOLLING=1
|
||||
- WATCHPACK_POLLING=true
|
||||
|
||||
fems-api:
|
||||
ports:
|
||||
- "3001:3001"
|
||||
command: npm run dev
|
||||
|
||||
postgres:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
redis:
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
internal:
|
||||
driver: bridge
|
160
docker-compose.full.yml
Normal file
160
docker-compose.full.yml
Normal file
@ -0,0 +1,160 @@
|
||||
# docker-compose.full.yml
|
||||
# 전체 스택 설정 (모든 서비스 포함)
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
# 기존 서비스들은 base 설정을 상속
|
||||
|
||||
# 추가 서비스들
|
||||
timescaledb:
|
||||
image: timescale/timescaledb:latest-pg15
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "5432"
|
||||
environment:
|
||||
POSTGRES_DB: ${TIMESCALEDB_DB}
|
||||
POSTGRES_USER: ${TIMESCALEDB_USER}
|
||||
POSTGRES_PASSWORD: ${TIMESCALEDB_PASSWORD}
|
||||
volumes:
|
||||
- timescaledb_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test:
|
||||
["CMD-SHELL", "pg_isready -U ${TIMESCALEDB_USER} -d ${TIMESCALEDB_DB}"]
|
||||
networks:
|
||||
- internal
|
||||
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto:latest
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "1883"
|
||||
- "9001"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.mqtt-ws.rule=Host(`${MQTT_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.mqtt-ws.entrypoints=websecure"
|
||||
- "traefik.http.routers.mqtt-ws.tls=true"
|
||||
volumes:
|
||||
- ./config/mosquitto:/mosquitto/config
|
||||
- mosquitto_data:/mosquitto/data
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
|
||||
node-red:
|
||||
image: nodered/node-red:latest
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "1880"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.node-red.rule=Host(`${NODERED_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.node-red.entrypoints=websecure"
|
||||
- "traefik.http.routers.node-red.tls=true"
|
||||
volumes:
|
||||
- node_red_data:/data
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
|
||||
# 백업 서비스 추가
|
||||
backup-service:
|
||||
image: backup-image
|
||||
volumes:
|
||||
- postgres_data:/backup/postgres:ro
|
||||
- timescaledb_data:/backup/timescale:ro
|
||||
environment:
|
||||
- BACKUP_SCHEDULE=0 0 * * *
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Monitoring Stack
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "9090"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.prometheus.rule=Host(`${PROMETHEUS_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.prometheus.entrypoints=websecure"
|
||||
- "traefik.http.routers.prometheus.tls=true"
|
||||
- "traefik.http.services.prometheus.loadbalancer.server.port=9090"
|
||||
volumes:
|
||||
- ./config/prometheus:/etc/prometheus
|
||||
- prometheus_data:/prometheus
|
||||
depends_on:
|
||||
- fems-admin
|
||||
- fems-app
|
||||
- fems-api
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "3000"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.grafana.rule=Host(`${GRAFANA_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.grafana.entrypoints=websecure"
|
||||
- "traefik.http.routers.grafana.tls=true"
|
||||
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
||||
volumes:
|
||||
- ./config/grafana:/etc/grafana/provisioning
|
||||
- grafana_data:/var/lib/grafana
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
|
||||
# Logging Stack
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- ES_JAVA_OPTS=-Xms512m -Xmx512m
|
||||
ports:
|
||||
- "${ELASTICSEARCH_PORT:-9200}:9200"
|
||||
volumes:
|
||||
- elasticsearch_data:/usr/share/elasticsearch/data
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Kibana
|
||||
kibana:
|
||||
image: docker.elastic.co/kibana/kibana:8.8.0
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "5601"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.kibana.rule=Host(`${KIBANA_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.kibana.entrypoints=websecure"
|
||||
- "traefik.http.routers.kibana.tls=true"
|
||||
- "traefik.http.services.kibana.loadbalancer.server.port=5601"
|
||||
environment:
|
||||
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
|
||||
volumes:
|
||||
timescaledb_data:
|
||||
mosquitto_data:
|
||||
node_red_data:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
elasticsearch_data:
|
||||
|
||||
networks:
|
||||
${TRAEFIK_NETWORK}:
|
||||
external: true
|
||||
internal:
|
||||
driver: bridge
|
63
docker-compose.prod.yml
Normal file
63
docker-compose.prod.yml
Normal file
@ -0,0 +1,63 @@
|
||||
# docker-compose.prod.yml
|
||||
# 운영 환경 설정
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
fems-admin:
|
||||
expose:
|
||||
- "3000"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.50"
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: "0.25"
|
||||
memory: 256M
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.fems-admin.rule=Host(`${ADMIN_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.fems-admin.entrypoints=websecure"
|
||||
- "traefik.http.routers.fems-admin.tls=true"
|
||||
- "traefik.http.routers.fems-admin.middlewares=secured@file"
|
||||
- "traefik.http.services.fems-admin.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
command: npm start
|
||||
|
||||
fems-app:
|
||||
expose:
|
||||
- "3000"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.fems-app.rule=Host(`${APP_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.fems-app.entrypoints=websecure"
|
||||
- "traefik.http.routers.fems-app.tls=true"
|
||||
- "traefik.http.services.fems-app.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
command: npm start
|
||||
|
||||
fems-api:
|
||||
expose:
|
||||
- "3001"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.fems-api.rule=Host(`${API_SUBDOMAIN}`)"
|
||||
- "traefik.http.routers.fems-api.entrypoints=websecure"
|
||||
- "traefik.http.routers.fems-api.tls=true"
|
||||
- "traefik.http.services.fems-api.loadbalancer.server.port=3001"
|
||||
networks:
|
||||
- ${TRAEFIK_NETWORK}
|
||||
- internal
|
||||
command: npm start
|
||||
|
||||
networks:
|
||||
${TRAEFIK_NETWORK}:
|
||||
external: true
|
||||
internal:
|
||||
driver: bridge
|
3
fems-admin/.eslintrc.json
Normal file
3
fems-admin/.eslintrc.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["next/core-web-vitals", "next/typescript"]
|
||||
}
|
36
fems-admin/.gitignore
vendored
Normal file
36
fems-admin/.gitignore
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
.yarn/install-state.gz
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
36
fems-admin/README.md
Normal file
36
fems-admin/README.md
Normal file
@ -0,0 +1,36 @@
|
||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
20
fems-admin/components.json
Normal file
20
fems-admin/components.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "default",
|
||||
"rsc": true,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.ts",
|
||||
"css": "src/app/globals.css",
|
||||
"baseColor": "gray",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils",
|
||||
"ui": "@/components/ui",
|
||||
"lib": "@/lib",
|
||||
"hooks": "@/hooks"
|
||||
}
|
||||
}
|
4
fems-admin/next.config.mjs
Normal file
4
fems-admin/next.config.mjs
Normal file
@ -0,0 +1,4 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
|
||||
export default nextConfig;
|
5170
fems-admin/package-lock.json
generated
Normal file
5170
fems-admin/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
fems-admin/package.json
Normal file
31
fems-admin/package.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "fems-admin",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
"lucide-react": "^0.454.0",
|
||||
"next": "14.2.16",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"tailwind-merge": "^2.5.4",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.16",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
8
fems-admin/postcss.config.mjs
Normal file
8
fems-admin/postcss.config.mjs
Normal file
@ -0,0 +1,8 @@
|
||||
/** @type {import('postcss-load-config').Config} */
|
||||
const config = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
BIN
fems-admin/src/app/favicon.ico
Normal file
BIN
fems-admin/src/app/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
fems-admin/src/app/fonts/GeistMonoVF.woff
Normal file
BIN
fems-admin/src/app/fonts/GeistMonoVF.woff
Normal file
Binary file not shown.
BIN
fems-admin/src/app/fonts/GeistVF.woff
Normal file
BIN
fems-admin/src/app/fonts/GeistVF.woff
Normal file
Binary file not shown.
78
fems-admin/src/app/globals.css
Normal file
78
fems-admin/src/app/globals.css
Normal file
@ -0,0 +1,78 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 224 71.4% 4.1%;
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 224 71.4% 4.1%;
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 224 71.4% 4.1%;
|
||||
--primary: 220.9 39.3% 11%;
|
||||
--primary-foreground: 210 20% 98%;
|
||||
--secondary: 220 14.3% 95.9%;
|
||||
--secondary-foreground: 220.9 39.3% 11%;
|
||||
--muted: 220 14.3% 95.9%;
|
||||
--muted-foreground: 220 8.9% 46.1%;
|
||||
--accent: 220 14.3% 95.9%;
|
||||
--accent-foreground: 220.9 39.3% 11%;
|
||||
--destructive: 0 84.2% 60.2%;
|
||||
--destructive-foreground: 210 20% 98%;
|
||||
--border: 220 13% 91%;
|
||||
--input: 220 13% 91%;
|
||||
--ring: 224 71.4% 4.1%;
|
||||
--chart-1: 12 76% 61%;
|
||||
--chart-2: 173 58% 39%;
|
||||
--chart-3: 197 37% 24%;
|
||||
--chart-4: 43 74% 66%;
|
||||
--chart-5: 27 87% 67%;
|
||||
--radius: 0.5rem;
|
||||
}
|
||||
.dark {
|
||||
--background: 224 71.4% 4.1%;
|
||||
--foreground: 210 20% 98%;
|
||||
--card: 224 71.4% 4.1%;
|
||||
--card-foreground: 210 20% 98%;
|
||||
--popover: 224 71.4% 4.1%;
|
||||
--popover-foreground: 210 20% 98%;
|
||||
--primary: 210 20% 98%;
|
||||
--primary-foreground: 220.9 39.3% 11%;
|
||||
--secondary: 215 27.9% 16.9%;
|
||||
--secondary-foreground: 210 20% 98%;
|
||||
--muted: 215 27.9% 16.9%;
|
||||
--muted-foreground: 217.9 10.6% 64.9%;
|
||||
--accent: 215 27.9% 16.9%;
|
||||
--accent-foreground: 210 20% 98%;
|
||||
--destructive: 0 62.8% 30.6%;
|
||||
--destructive-foreground: 210 20% 98%;
|
||||
--border: 215 27.9% 16.9%;
|
||||
--input: 215 27.9% 16.9%;
|
||||
--ring: 216 12.2% 83.9%;
|
||||
--chart-1: 220 70% 50%;
|
||||
--chart-2: 160 60% 45%;
|
||||
--chart-3: 30 80% 55%;
|
||||
--chart-4: 280 65% 60%;
|
||||
--chart-5: 340 75% 55%;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
35
fems-admin/src/app/layout.tsx
Normal file
35
fems-admin/src/app/layout.tsx
Normal file
@ -0,0 +1,35 @@
|
||||
import type { Metadata } from "next";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = localFont({
|
||||
src: "./fonts/GeistVF.woff",
|
||||
variable: "--font-geist-sans",
|
||||
weight: "100 900",
|
||||
});
|
||||
const geistMono = localFont({
|
||||
src: "./fonts/GeistMonoVF.woff",
|
||||
variable: "--font-geist-mono",
|
||||
weight: "100 900",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
101
fems-admin/src/app/page.tsx
Normal file
101
fems-admin/src/app/page.tsx
Normal file
@ -0,0 +1,101 @@
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="https://nextjs.org/icons/next.svg"
|
||||
alt="Next.js logo"
|
||||
width={180}
|
||||
height={38}
|
||||
priority
|
||||
/>
|
||||
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
|
||||
<li className="mb-2">
|
||||
Get started by editing{" "}
|
||||
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
|
||||
src/app/page.tsx
|
||||
</code>
|
||||
.
|
||||
</li>
|
||||
<li>Save and see your changes instantly.</li>
|
||||
</ol>
|
||||
|
||||
<div className="flex gap-4 items-center flex-col sm:flex-row">
|
||||
<a
|
||||
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="https://nextjs.org/icons/vercel.svg"
|
||||
alt="Vercel logomark"
|
||||
width={20}
|
||||
height={20}
|
||||
/>
|
||||
Deploy now
|
||||
</a>
|
||||
<a
|
||||
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Read our docs
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="https://nextjs.org/icons/file.svg"
|
||||
alt="File icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Learn
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="https://nextjs.org/icons/window.svg"
|
||||
alt="Window icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Examples
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="https://nextjs.org/icons/globe.svg"
|
||||
alt="Globe icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Go to nextjs.org →
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
6
fems-admin/src/lib/utils.ts
Normal file
6
fems-admin/src/lib/utils.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { clsx, type ClassValue } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
63
fems-admin/tailwind.config.ts
Normal file
63
fems-admin/tailwind.config.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import type { Config } from "tailwindcss";
|
||||
|
||||
const config: Config = {
|
||||
darkMode: ["class"],
|
||||
content: [
|
||||
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
background: 'hsl(var(--background))',
|
||||
foreground: 'hsl(var(--foreground))',
|
||||
card: {
|
||||
DEFAULT: 'hsl(var(--card))',
|
||||
foreground: 'hsl(var(--card-foreground))'
|
||||
},
|
||||
popover: {
|
||||
DEFAULT: 'hsl(var(--popover))',
|
||||
foreground: 'hsl(var(--popover-foreground))'
|
||||
},
|
||||
primary: {
|
||||
DEFAULT: 'hsl(var(--primary))',
|
||||
foreground: 'hsl(var(--primary-foreground))'
|
||||
},
|
||||
secondary: {
|
||||
DEFAULT: 'hsl(var(--secondary))',
|
||||
foreground: 'hsl(var(--secondary-foreground))'
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: 'hsl(var(--muted))',
|
||||
foreground: 'hsl(var(--muted-foreground))'
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: 'hsl(var(--accent))',
|
||||
foreground: 'hsl(var(--accent-foreground))'
|
||||
},
|
||||
destructive: {
|
||||
DEFAULT: 'hsl(var(--destructive))',
|
||||
foreground: 'hsl(var(--destructive-foreground))'
|
||||
},
|
||||
border: 'hsl(var(--border))',
|
||||
input: 'hsl(var(--input))',
|
||||
ring: 'hsl(var(--ring))',
|
||||
chart: {
|
||||
'1': 'hsl(var(--chart-1))',
|
||||
'2': 'hsl(var(--chart-2))',
|
||||
'3': 'hsl(var(--chart-3))',
|
||||
'4': 'hsl(var(--chart-4))',
|
||||
'5': 'hsl(var(--chart-5))'
|
||||
}
|
||||
},
|
||||
borderRadius: {
|
||||
lg: 'var(--radius)',
|
||||
md: 'calc(var(--radius) - 2px)',
|
||||
sm: 'calc(var(--radius) - 4px)'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [require("tailwindcss-animate")],
|
||||
};
|
||||
export default config;
|
26
fems-admin/tsconfig.json
Normal file
26
fems-admin/tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
3
fems-app/.eslintrc.json
Normal file
3
fems-app/.eslintrc.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["next/core-web-vitals", "next/typescript"]
|
||||
}
|
36
fems-app/.gitignore
vendored
Normal file
36
fems-app/.gitignore
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
.yarn/install-state.gz
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
36
fems-app/README.md
Normal file
36
fems-app/README.md
Normal file
@ -0,0 +1,36 @@
|
||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
20
fems-app/components.json
Normal file
20
fems-app/components.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "default",
|
||||
"rsc": true,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.ts",
|
||||
"css": "src/app/globals.css",
|
||||
"baseColor": "gray",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils",
|
||||
"ui": "@/components/ui",
|
||||
"lib": "@/lib",
|
||||
"hooks": "@/hooks"
|
||||
}
|
||||
}
|
4
fems-app/next.config.mjs
Normal file
4
fems-app/next.config.mjs
Normal file
@ -0,0 +1,4 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
|
||||
export default nextConfig;
|
5170
fems-app/package-lock.json
generated
Normal file
5170
fems-app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
fems-app/package.json
Normal file
31
fems-app/package.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "fems-app",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
"lucide-react": "^0.454.0",
|
||||
"next": "14.2.16",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"tailwind-merge": "^2.5.4",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.16",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
8
fems-app/postcss.config.mjs
Normal file
8
fems-app/postcss.config.mjs
Normal file
@ -0,0 +1,8 @@
|
||||
/** @type {import('postcss-load-config').Config} */
|
||||
const config = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
BIN
fems-app/src/app/favicon.ico
Normal file
BIN
fems-app/src/app/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
fems-app/src/app/fonts/GeistMonoVF.woff
Normal file
BIN
fems-app/src/app/fonts/GeistMonoVF.woff
Normal file
Binary file not shown.
BIN
fems-app/src/app/fonts/GeistVF.woff
Normal file
BIN
fems-app/src/app/fonts/GeistVF.woff
Normal file
Binary file not shown.
78
fems-app/src/app/globals.css
Normal file
78
fems-app/src/app/globals.css
Normal file
@ -0,0 +1,78 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 224 71.4% 4.1%;
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 224 71.4% 4.1%;
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 224 71.4% 4.1%;
|
||||
--primary: 220.9 39.3% 11%;
|
||||
--primary-foreground: 210 20% 98%;
|
||||
--secondary: 220 14.3% 95.9%;
|
||||
--secondary-foreground: 220.9 39.3% 11%;
|
||||
--muted: 220 14.3% 95.9%;
|
||||
--muted-foreground: 220 8.9% 46.1%;
|
||||
--accent: 220 14.3% 95.9%;
|
||||
--accent-foreground: 220.9 39.3% 11%;
|
||||
--destructive: 0 84.2% 60.2%;
|
||||
--destructive-foreground: 210 20% 98%;
|
||||
--border: 220 13% 91%;
|
||||
--input: 220 13% 91%;
|
||||
--ring: 224 71.4% 4.1%;
|
||||
--chart-1: 12 76% 61%;
|
||||
--chart-2: 173 58% 39%;
|
||||
--chart-3: 197 37% 24%;
|
||||
--chart-4: 43 74% 66%;
|
||||
--chart-5: 27 87% 67%;
|
||||
--radius: 0.5rem;
|
||||
}
|
||||
.dark {
|
||||
--background: 224 71.4% 4.1%;
|
||||
--foreground: 210 20% 98%;
|
||||
--card: 224 71.4% 4.1%;
|
||||
--card-foreground: 210 20% 98%;
|
||||
--popover: 224 71.4% 4.1%;
|
||||
--popover-foreground: 210 20% 98%;
|
||||
--primary: 210 20% 98%;
|
||||
--primary-foreground: 220.9 39.3% 11%;
|
||||
--secondary: 215 27.9% 16.9%;
|
||||
--secondary-foreground: 210 20% 98%;
|
||||
--muted: 215 27.9% 16.9%;
|
||||
--muted-foreground: 217.9 10.6% 64.9%;
|
||||
--accent: 215 27.9% 16.9%;
|
||||
--accent-foreground: 210 20% 98%;
|
||||
--destructive: 0 62.8% 30.6%;
|
||||
--destructive-foreground: 210 20% 98%;
|
||||
--border: 215 27.9% 16.9%;
|
||||
--input: 215 27.9% 16.9%;
|
||||
--ring: 216 12.2% 83.9%;
|
||||
--chart-1: 220 70% 50%;
|
||||
--chart-2: 160 60% 45%;
|
||||
--chart-3: 30 80% 55%;
|
||||
--chart-4: 280 65% 60%;
|
||||
--chart-5: 340 75% 55%;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
35
fems-app/src/app/layout.tsx
Normal file
35
fems-app/src/app/layout.tsx
Normal file
@ -0,0 +1,35 @@
|
||||
import type { Metadata } from "next";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = localFont({
|
||||
src: "./fonts/GeistVF.woff",
|
||||
variable: "--font-geist-sans",
|
||||
weight: "100 900",
|
||||
});
|
||||
const geistMono = localFont({
|
||||
src: "./fonts/GeistMonoVF.woff",
|
||||
variable: "--font-geist-mono",
|
||||
weight: "100 900",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
101
fems-app/src/app/page.tsx
Normal file
101
fems-app/src/app/page.tsx
Normal file
@ -0,0 +1,101 @@
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="https://nextjs.org/icons/next.svg"
|
||||
alt="Next.js logo"
|
||||
width={180}
|
||||
height={38}
|
||||
priority
|
||||
/>
|
||||
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
|
||||
<li className="mb-2">
|
||||
Get started by editing{" "}
|
||||
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
|
||||
src/app/page.tsx
|
||||
</code>
|
||||
.
|
||||
</li>
|
||||
<li>Save and see your changes instantly.</li>
|
||||
</ol>
|
||||
|
||||
<div className="flex gap-4 items-center flex-col sm:flex-row">
|
||||
<a
|
||||
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="https://nextjs.org/icons/vercel.svg"
|
||||
alt="Vercel logomark"
|
||||
width={20}
|
||||
height={20}
|
||||
/>
|
||||
Deploy now
|
||||
</a>
|
||||
<a
|
||||
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Read our docs
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="https://nextjs.org/icons/file.svg"
|
||||
alt="File icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Learn
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="https://nextjs.org/icons/window.svg"
|
||||
alt="Window icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Examples
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="https://nextjs.org/icons/globe.svg"
|
||||
alt="Globe icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Go to nextjs.org →
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
6
fems-app/src/lib/utils.ts
Normal file
6
fems-app/src/lib/utils.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { clsx, type ClassValue } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
63
fems-app/tailwind.config.ts
Normal file
63
fems-app/tailwind.config.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import type { Config } from "tailwindcss";
|
||||
|
||||
const config: Config = {
|
||||
darkMode: ["class"],
|
||||
content: [
|
||||
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
background: 'hsl(var(--background))',
|
||||
foreground: 'hsl(var(--foreground))',
|
||||
card: {
|
||||
DEFAULT: 'hsl(var(--card))',
|
||||
foreground: 'hsl(var(--card-foreground))'
|
||||
},
|
||||
popover: {
|
||||
DEFAULT: 'hsl(var(--popover))',
|
||||
foreground: 'hsl(var(--popover-foreground))'
|
||||
},
|
||||
primary: {
|
||||
DEFAULT: 'hsl(var(--primary))',
|
||||
foreground: 'hsl(var(--primary-foreground))'
|
||||
},
|
||||
secondary: {
|
||||
DEFAULT: 'hsl(var(--secondary))',
|
||||
foreground: 'hsl(var(--secondary-foreground))'
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: 'hsl(var(--muted))',
|
||||
foreground: 'hsl(var(--muted-foreground))'
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: 'hsl(var(--accent))',
|
||||
foreground: 'hsl(var(--accent-foreground))'
|
||||
},
|
||||
destructive: {
|
||||
DEFAULT: 'hsl(var(--destructive))',
|
||||
foreground: 'hsl(var(--destructive-foreground))'
|
||||
},
|
||||
border: 'hsl(var(--border))',
|
||||
input: 'hsl(var(--input))',
|
||||
ring: 'hsl(var(--ring))',
|
||||
chart: {
|
||||
'1': 'hsl(var(--chart-1))',
|
||||
'2': 'hsl(var(--chart-2))',
|
||||
'3': 'hsl(var(--chart-3))',
|
||||
'4': 'hsl(var(--chart-4))',
|
||||
'5': 'hsl(var(--chart-5))'
|
||||
}
|
||||
},
|
||||
borderRadius: {
|
||||
lg: 'var(--radius)',
|
||||
md: 'calc(var(--radius) - 2px)',
|
||||
sm: 'calc(var(--radius) - 4px)'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [require("tailwindcss-animate")],
|
||||
};
|
||||
export default config;
|
26
fems-app/tsconfig.json
Normal file
26
fems-app/tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
27
logs.sh
Normal file
27
logs.sh
Normal file
@ -0,0 +1,27 @@
|
||||
# logs.sh
|
||||
#!/bin/bash
|
||||
|
||||
# 서비스 이름을 인자로 받음
|
||||
SERVICE_NAME=$1
|
||||
|
||||
if [ -z "$SERVICE_NAME" ]; then
|
||||
echo "Usage: ./logs.sh [service_name]"
|
||||
echo "Available services:"
|
||||
if [ "$NODE_ENV" = "production" ]; then
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -f docker-compose.full.yml ps --services
|
||||
else
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.dev.yml ps --services
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 환경에 따라 로그 출력
|
||||
if [ "$NODE_ENV" = "production" ]; then
|
||||
if [ -f "docker-compose.full.yml" ]; then
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -f docker-compose.full.yml logs -f "$SERVICE_NAME"
|
||||
else
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml logs -f "$SERVICE_NAME"
|
||||
fi
|
||||
else
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.dev.yml logs -f "$SERVICE_NAME"
|
||||
fi
|
11
restart.sh
Normal file
11
restart.sh
Normal file
@ -0,0 +1,11 @@
|
||||
# restart.sh
|
||||
#!/bin/bash
|
||||
|
||||
# 서비스 이름을 인자로 받음
|
||||
SERVICE_NAME=$1
|
||||
|
||||
if [ -z "$SERVICE_NAME" ]; then
|
||||
echo "Usage: ./restart.sh [service_name]"
|
||||
echo "Available services:"
|
||||
if [ "$NODE_ENV" = "production" ]; then
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -
|
17
start-dev.sh
Normal file
17
start-dev.sh
Normal file
@ -0,0 +1,17 @@
|
||||
# start-dev.sh
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting FEMS Development Environment..."
|
||||
|
||||
# 환경 변수 로드
|
||||
export NODE_ENV=development
|
||||
|
||||
# 이전 컨테이너 정리
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.dev.yml down
|
||||
|
||||
# 컨테이너 시작
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.dev.yml up -d
|
||||
|
||||
# 로그 표시
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.dev.yml logs -f
|
||||
|
16
start-full.sh
Normal file
16
start-full.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# start-full.sh
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting FEMS Full Stack Environment..."
|
||||
|
||||
# 환경 변수 로드
|
||||
export NODE_ENV=production
|
||||
|
||||
# 이전 컨테이너 정리
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -f docker-compose.full.yml down
|
||||
|
||||
# 컨테이너 시작
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -f docker-compose.full.yml up -d
|
||||
|
||||
# 상태 확인
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -f docker-compose.full.yml ps
|
16
start-prod.sh
Normal file
16
start-prod.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# start-prod.sh
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting FEMS Production Environment..."
|
||||
|
||||
# 환경 변수 로드
|
||||
export NODE_ENV=production
|
||||
|
||||
# 이전 컨테이너 정리
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml down
|
||||
|
||||
# 컨테이너 시작
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml up -d
|
||||
|
||||
# 상태 확인
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml ps
|
15
stop.sh
Normal file
15
stop.sh
Normal file
@ -0,0 +1,15 @@
|
||||
# stop.sh
|
||||
#!/bin/bash
|
||||
|
||||
echo "Stopping FEMS Environment..."
|
||||
|
||||
# 현재 NODE_ENV 확인
|
||||
if [ "$NODE_ENV" = "production" ]; then
|
||||
if [ -f "docker-compose.full.yml" ]; then
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml -f docker-compose.full.yml down
|
||||
else
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.prod.yml down
|
||||
fi
|
||||
else
|
||||
docker-compose -f docker-compose.base.yml -f docker-compose.dev.yml down
|
||||
fi
|
Loading…
Reference in New Issue
Block a user