Skip to content

Commit 18736cd

Browse files
author
Aaasaasa Aleksandar Stajic
committed
feat:optipex Nuxt 4 Docker Prisma
1 parent 79ef568 commit 18736cd

File tree

222 files changed

+60733
-15428
lines changed

Some content is hidden

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

222 files changed

+60733
-15428
lines changed

.env.example

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1 @@
1-
SECURE_SESSION_KEY=
2-
3-
4-
# ========================
5-
# Database Configurations
6-
# ========================
7-
# PostgreSQL
8-
POSTGRES_HOST=
9-
POSTGRES_PORT=
10-
POSTGRES_USER=
11-
POSTGRES_PASSWORD=
12-
POSTGRES_DB=
13-
# --- PostgreSQL (existing baza = prisma/schema.prisma) ---
14-
POSTGRES_URL=
15-
16-
# --- PostgreSQL (CMS baza = prisma/adapters/schema-postgres.prisma) ---
17-
POSTGRES_CMS_URL=
18-
19-
20-
# MySQL (WordPress) %23
21-
MYSQL_HOST=
22-
MYSQL_PORT=
23-
MYSQL_USER=
24-
MYSQL_PASSWORD=
25-
26-
MYSQL_NAME=
27-
MYSQL_ROOT_PASSWORD=
28-
# --- MySQL (za import / WordPress dump) ---
29-
MYSQL_URL=
30-
31-
# --- MongoDB (za mgArticle i kasnije skaliranje) ---
32-
# MongoDB (New)
33-
MONGO_PORT=
34-
MONGO_ROOT_USER=
35-
MONGO_ROOT_PASSWORD=
36-
MONGO_DB=
37-
MONGO_USER=
38-
MONGO_PASSWORD=
39-
MONGO_URL=
40-
41-
# --- Redis (cache/session store) ---
42-
REDIS_URL=
43-
44-
# --- Session secret (Nuxt session module koristi ovo) ---
45-
NUXT_SESSION_SECRET=
46-
47-
# --- Optional: Base URL za server ---
48-
NUXT_PUBLIC_API_BASE=
49-
50-
# --- OpenAPI/Swagger info ---
51-
API_TITLE=
52-
API_VERSION=
53-
54-
# Node:
55-
56-
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
57-
58-
59-
# OpenSSL:
60-
61-
# openssl rand -hex 32
62-
63-
64-
# Python:
65-
66-
# python -c "import secrets; print(secrets.token_hex(32))"
67-
68-
PORT=
69-
HOST=
70-
NODE_ENV="development"
71-
72-
73-
# This was inserted by `prisma init`:
74-
# Environment variables declared in this file are automatically made available to Prisma.
75-
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
76-
77-
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
78-
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
79-
80-
DATABASE_URL=
81-
1+
NUXT_SESSION_PASSWORD=

.mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"nuxt": {
88
"type": "sse",
9-
"url": "http://localhost:3000/__mcp/sse"
9+
"url": "http://localhost:4000/__mcp/sse"
1010
},
1111
"prisma": {
1212
"type": "http",

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

app/admin/app.config.ts

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
// app/admin/app.config.ts
2+
import { defineAppConfig } from 'nuxt/app'
3+
4+
export default defineAppConfig({
5+
i18n: {
6+
locales: [
7+
{
8+
code: 'de',
9+
name: 'Deutsch',
10+
files: ['de/common.json', 'de/seo.json'],
11+
language: 'de-DE',
12+
flag: 'i-openmoji:flag-germany'
13+
},
14+
{
15+
code: 'en',
16+
name: 'English',
17+
files: ['en/common.json', 'en/seo.json'],
18+
language: 'en-US',
19+
flag: 'i-openmoji:flag-united-states'
20+
},
21+
{
22+
code: 'sr',
23+
name: 'Србски',
24+
files: ['sr/common.json', 'sr/seo.json'],
25+
language: 'sr-SR',
26+
flag: 'i-openmoji:flag-serbia'
27+
},
28+
{
29+
code: 'ru',
30+
name: 'Russia',
31+
files: ['ru/common.json', 'ru/seo.json'],
32+
language: 'ru-RU',
33+
flag: 'i-openmoji:flag-russia'
34+
},
35+
{
36+
code: 'es',
37+
name: 'Español',
38+
files: ['es/common.json', 'es/seo.json'],
39+
language: 'es-ES',
40+
flag: 'i-openmoji:flag-spain'
41+
},
42+
{
43+
code: 'it',
44+
name: 'Italy',
45+
files: ['it/common.json', 'it/seo.json'],
46+
language: 'it-IT',
47+
flag: 'i-openmoji:flag-italy'
48+
}
49+
],
50+
defaultLocale: 'de',
51+
strategy: 'prefix_except_default'
52+
},
53+
ui: {
54+
icons: ['lucide', 'openmoji'],
55+
primary: 'indigo',
56+
gray: 'neutral',
57+
darkMode: true,
58+
radius: 'md',
59+
strategy: 'merge',
60+
container: {
61+
constrained: 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8'
62+
},
63+
64+
button: {
65+
base: 'inline-flex items-center justify-center font-medium focus:outline-none focus-visible:ring-2',
66+
variants: {
67+
solid: 'bg-primary-600 text-white hover:bg-primary-700 focus-visible:ring-primary-500',
68+
outline: 'border border-gray-300 text-gray-700 hover:bg-gray-50',
69+
ghost: 'text-gray-700 hover:bg-gray-100'
70+
},
71+
sizes: {
72+
sm: 'px-2.5 py-1.5 text-sm',
73+
md: 'px-4 py-2 text-sm',
74+
lg: 'px-6 py-3 text-base'
75+
}
76+
},
77+
78+
card: {
79+
base: 'rounded-lg shadow-sm border border-gray-200 bg-white dark:bg-gray-900',
80+
header: 'px-4 py-2 border-b border-gray-200 dark:border-gray-800 font-semibold',
81+
body: 'p-4',
82+
footer: 'px-4 py-2 border-t border-gray-200 dark:border-gray-800 text-sm text-gray-500'
83+
},
84+
85+
input: {
86+
base: 'block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500',
87+
sizes: {
88+
sm: 'text-sm',
89+
md: 'text-base'
90+
}
91+
},
92+
93+
modal: {
94+
overlay: 'fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4',
95+
content: 'bg-white dark:bg-gray-900 rounded-2xl shadow-lg max-w-lg w-full overflow-hidden'
96+
}
97+
},
98+
99+
theme: {
100+
colorMode: {
101+
preference: 'system',
102+
fallback: 'light'
103+
}
104+
},
105+
106+
layout: {
107+
sidebarWidth: '16rem',
108+
containerMaxWidth: '1440px'
109+
},
110+
111+
appMeta: {
112+
title: 'Admin Dashboard',
113+
description: 'Bazify admin control panel built with Nuxt 4, TailwindCSS and @nuxt/ui'
114+
}
115+
})

app/admin/app.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script setup lang="ts">
2+
import * as locales from '@nuxt/ui/locale'
3+
const { locale } = useI18n()
4+
</script>
5+
6+
<template>
7+
<UApp :locale="locales[locale]">
8+
<NuxtLayout>
9+
<NuxtPage />
10+
</NuxtLayout>
11+
</UApp>
12+
</template>

app/admin/assets/css/tailwind.css

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
/* app/admin/assets/css/tailwind.css */
2+
3+
/* ─── Imports ─────────────────────────────────────────── */
4+
@import "tw-animate-css";
5+
@import "tailwindcss";
6+
@import "tailwindcss/utilities";
7+
@import "@nuxt/ui";
8+
@import "@fontsource/inter/latin.css";
9+
10+
/* ─── Tailwind theme vars (mapa na CSS varijable) ─────── */
11+
@theme inline {
12+
--color-background: var(--background);
13+
--color-foreground: var(--foreground);
14+
15+
--color-card: var(--card);
16+
--color-card-foreground: var(--card-foreground);
17+
18+
--color-popover: var(--popover);
19+
--color-popover-foreground: var(--popover-foreground);
20+
21+
--color-primary: var(--primary);
22+
--color-primary-foreground: var(--primary-foreground);
23+
24+
--color-secondary: var(--secondary);
25+
--color-secondary-foreground: var(--secondary-foreground);
26+
27+
--color-muted: var(--muted);
28+
--color-muted-foreground: var(--muted-foreground);
29+
30+
--color-accent: var(--accent);
31+
--color-accent-foreground: var(--accent-foreground);
32+
33+
--color-destructive: var(--destructive);
34+
--color-destructive-foreground: var(--destructive-foreground);
35+
36+
--color-border: var(--border);
37+
--color-input: var(--input);
38+
--color-ring: var(--ring);
39+
40+
--color-chart-1: var(--chart-1);
41+
--color-chart-2: var(--chart-2);
42+
--color-chart-3: var(--chart-3);
43+
--color-chart-4: var(--chart-4);
44+
--color-chart-5: var(--chart-5);
45+
46+
--radius-sm: calc(var(--radius) - 4px);
47+
--radius-md: calc(var(--radius) - 2px);
48+
--radius-lg: var(--radius);
49+
--radius-xl: calc(var(--radius) + 4px);
50+
51+
--color-sidebar: var(--sidebar);
52+
--color-sidebar-foreground: var(--sidebar-foreground);
53+
--color-sidebar-primary: var(--sidebar-primary);
54+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
55+
--color-sidebar-accent: var(--sidebar-accent);
56+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
57+
--color-sidebar-border: var(--sidebar-border);
58+
--color-sidebar-ring: var(--sidebar-ring);
59+
}
60+
61+
/* ─── Light (default) theme ──────────────────────────── */
62+
:root {
63+
--background: oklch(1 0 0);
64+
--foreground: oklch(0.147 0.004 49.25);
65+
66+
--card: oklch(1 0 0);
67+
--card-foreground: oklch(0.147 0.004 49.25);
68+
69+
--popover: oklch(1 0 0);
70+
--popover-foreground: oklch(0.147 0.004 49.25);
71+
72+
--primary: oklch(0.216 0.006 56.043);
73+
--primary-foreground: oklch(0.985 0.001 106.423);
74+
75+
--secondary: oklch(0.97 0.001 106.424);
76+
--secondary-foreground: oklch(0.216 0.006 56.043);
77+
78+
--muted: oklch(0.97 0.001 106.424);
79+
--muted-foreground: oklch(0.553 0.013 58.071);
80+
81+
--accent: oklch(0.97 0.001 106.424);
82+
--accent-foreground: oklch(0.216 0.006 56.043);
83+
84+
--destructive: oklch(0.577 0.245 27.325);
85+
--destructive-foreground: oklch(0.985 0.001 106.423);
86+
87+
--border: oklch(0.923 0.003 48.717);
88+
--input: oklch(0.923 0.003 48.717);
89+
--ring: oklch(0.709 0.01 56.259);
90+
91+
--chart-1: oklch(0.646 0.222 41.116);
92+
--chart-2: oklch(0.6 0.118 184.704);
93+
--chart-3: oklch(0.398 0.07 227.392);
94+
--chart-4: oklch(0.828 0.189 84.429);
95+
--chart-5: oklch(0.769 0.188 70.08);
96+
97+
--radius: 0.625rem;
98+
99+
--sidebar: oklch(0.985 0.001 106.423);
100+
--sidebar-foreground: oklch(0.147 0.004 49.25);
101+
--sidebar-primary: oklch(0.216 0.006 56.043);
102+
--sidebar-primary-foreground: oklch(0.985 0.001 106.423);
103+
--sidebar-accent: oklch(0.97 0.001 106.424);
104+
--sidebar-accent-foreground: oklch(0.216 0.006 56.043);
105+
--sidebar-border: oklch(0.923 0.003 48.717);
106+
--sidebar-ring: oklch(0.709 0.01 56.259);
107+
}
108+
109+
/* ─── Dark theme ─────────────────────────────────────── */
110+
.dark {
111+
--background: oklch(0.147 0.004 49.25);
112+
--foreground: oklch(0.985 0.001 106.423);
113+
114+
--card: oklch(0.147 0.004 49.25);
115+
--card-foreground: oklch(0.985 0.001 106.423);
116+
117+
--popover: oklch(0.147 0.004 49.25);
118+
--popover-foreground: oklch(0.985 0.001 106.423);
119+
120+
--primary: oklch(0.985 0.001 106.423);
121+
--primary-foreground: oklch(0.216 0.006 56.043);
122+
123+
--secondary: oklch(0.268 0.007 34.298);
124+
--secondary-foreground: oklch(0.985 0.001 106.423);
125+
126+
--muted: oklch(0.268 0.007 34.298);
127+
--muted-foreground: oklch(0.709 0.01 56.259);
128+
129+
--accent: oklch(0.268 0.007 34.298);
130+
--accent-foreground: oklch(0.985 0.001 106.423);
131+
132+
--destructive: oklch(0.396 0.141 25.723);
133+
--destructive-foreground: oklch(0.637 0.237 25.331);
134+
135+
--border: oklch(0.268 0.007 34.298);
136+
--input: oklch(0.268 0.007 34.298);
137+
--ring: oklch(0.553 0.013 58.071);
138+
139+
--chart-1: oklch(0.488 0.243 264.376);
140+
--chart-2: oklch(0.696 0.17 162.48);
141+
--chart-3: oklch(0.769 0.188 70.08);
142+
--chart-4: oklch(0.627 0.265 303.9);
143+
--chart-5: oklch(0.645 0.246 16.439);
144+
145+
--sidebar: oklch(0.216 0.006 56.043);
146+
--sidebar-foreground: oklch(0.985 0.001 106.423);
147+
--sidebar-primary: oklch(0.488 0.243 264.376);
148+
--sidebar-primary-foreground: oklch(0.985 0.001 106.423);
149+
--sidebar-accent: oklch(0.268 0.007 34.298);
150+
--sidebar-accent-foreground: oklch(0.985 0.001 106.423);
151+
--sidebar-border: oklch(0.268 0.007 34.298);
152+
--sidebar-ring: oklch(0.553 0.013 58.071);
153+
}
154+
155+
/* ─── Base layer (reset) ─────────────────────────────── */
156+
@layer base {
157+
* {
158+
@apply border-border outline-ring/50;
159+
}
160+
body {
161+
@apply bg-background text-foreground;
162+
}
163+
}

0 commit comments

Comments
 (0)