Skip to content

Commit d6c166b

Browse files
committed
Merge branch 'main' of https://github.com/NettyDev/pizzahub
2 parents 1537252 + 553f390 commit d6c166b

File tree

34 files changed

+1471
-859
lines changed

34 files changed

+1471
-859
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.next/
3+
src/prisma/

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ COPY . .
88

99
ENV NEXT_TELEMETRY_DISABLED=1
1010

11-
RUN rm -rf node_modules && rm -rf .next && rm -rf src/prisma
1211
RUN bun install
1312
RUN bunx prisma generate
1413
RUN bun --bun run build
1514

1615
FROM base
1716

18-
COPY --from=builder /app/prisma ./prisma
17+
COPY /prisma ./prisma
18+
COPY /sql ./sql
19+
COPY entrypoint.ts .
1920
COPY --from=builder /app/.next/standalone ./
2021
COPY --from=builder /app/public ./public
2122
COPY --from=builder /app/.next/static ./.next/static
@@ -25,10 +26,10 @@ ENV HOSTNAME=0.0.0.0
2526
ENV NEXT_TELEMETRY_DISABLED=1
2627
ENV NODE_ENV=production
2728
ENV BETTER_AUTH_URL=http://localhost:3000
28-
ENV DATABASE_URL="postgresql://postgres:password@database:5432/next?schema=public"
29+
ENV DATABASE_URL="postgresql://postgres:password@database:5432/next"
2930
ENV SMTP_HOST=mail
3031
ENV SMTP_PORT=1025
3132
ENV AI_URL=ai:11434
3233
ENV LLM=gemma3:1b
3334

34-
CMD ["bunx", "prisma", "migrate", "deploy", "&&", "bun", "server.js"]
35+
ENTRYPOINT ["bun", "entrypoint.ts"]

dev.env

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
DATABASE_URL="postgresql://postgres:password@127.0.0.1:15432/next?schema=public"
1+
DATABASE_URL="postgresql://postgres:password@127.0.0.1:15432/next"
22
BETTER_AUTH_SECRET=SPRGXqjO3xljSDIz0kho2j7BuYsJtoOM
33
BETTER_AUTH_URL=http://localhost:3000
44
SMTP_HOST=localhost
55
SMTP_PORT=11025
6-
AI_URL=localhost:11434
7-
S3_URL=localhost:19000
6+
AI_URL=http://localhost:11434
87
LLM=gemma3:1b

docker-compose.dev.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
services:
2+
server:
3+
image: localhost/next:latest
4+
profiles: [full]
5+
ports:
6+
- 3000:3000
7+
28
database:
39
image: "postgres:17-alpine"
410
ports:
@@ -33,6 +39,7 @@ services:
3339

3440
ai:
3541
image: ollama/ollama
42+
profiles: [ai]
3643
ports:
3744
- 11434:11434
3845
volumes:

docker-compose.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
services:
2+
server-build:
3+
build:
4+
context: .
5+
no_cache: true
6+
profiles: [build]
7+
depends_on:
8+
- database
9+
ports:
10+
- 3000:3000
11+
12+
server:
13+
image: localhost/next:latest
14+
profiles: [ready]
15+
depends_on:
16+
- database
17+
ports:
18+
- 3000:3000
19+
20+
database:
21+
image: "postgres:17-alpine"
22+
environment:
23+
POSTGRES_PASSWORD: password
24+
25+
adminer:
26+
image: adminer:5-standalone
27+
ports:
28+
- 18080:8080
29+
depends_on:
30+
- database
31+
environment:
32+
ADMINER_DEFAULT_SERVER: database
33+
34+
mail:
35+
image: maildev/maildev
36+
ports:
37+
- 11080:1080
38+
39+
ai:
40+
image: ollama/ollama
41+
profiles: [ai]
42+
ports:
43+
- 11434:11434
44+
volumes:
45+
- ollama:/root/.ollama
46+
47+
volumes:
48+
ollama:

emails/EmailVerification.tsx

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { Button, Html, Section, Row, Column, Img, Head, Text, Font, Heading, Tailwind } from "@react-email/components";
2+
import Fonts from "./components/Fonts";
3+
4+
export default function EmailVerification(props: { name: string; url: string }) {
5+
return (
6+
<Html>
7+
<Head>
8+
<title>Zweryfikuj swój adres email</title>
9+
<Fonts />
10+
</Head>
11+
<Tailwind>
12+
<Section className="max-w-xl">
13+
<Row>
14+
<Column align="center">
15+
<Img height={100} src="http://localhost:3000/logo.svg" />
16+
</Column>
17+
</Row>
18+
<Section className="p-7">
19+
<Row>
20+
<Column>
21+
<Heading as="h1">Zweryfikuj swój adres email</Heading>
22+
<Text>Cześć {props.name},</Text>
23+
<Text>Witaj w PizzaHub!</Text>
24+
<Text>Proszę kliknij przycisk poniżej aby zweryfikować twój adres email.</Text>
25+
<Text>
26+
Jeżeli nie rejestrowałeś się na PizzaHub, proszę zignorować ten email lub skontaktuj się z nami na{" "}
27+
<a href="mailto:kontakt@pizzahub.pl" className="text-red-700">
28+
kontakt@pizzahub.pl
29+
</a>
30+
</Text>
31+
<Text>
32+
Pozdrawiamy <br /> Zespół PizzaHub
33+
</Text>
34+
</Column>
35+
</Row>
36+
<Row>
37+
<Column align="center">
38+
<Button href={props.url} target="_blank" className="px-10 py-6 bg-red-700 text-white">
39+
Zweryfikuj email
40+
</Button>
41+
</Column>
42+
</Row>
43+
</Section>
44+
<Row>
45+
<Column>
46+
<Heading as="h4">Potrzebujsz pomocy?</Heading>
47+
<Text>
48+
Jeśli masz jakieś pytania, komentarze lub sugestie, możesz do nas napisać. Chętnie rozwiążemy Twoje
49+
problemy.
50+
</Text>
51+
</Column>
52+
</Row>
53+
</Section>
54+
</Tailwind>
55+
</Html>
56+
);
57+
}

emails/components/Fonts.tsx

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
import { Font } from "@react-email/components";
2+
import React from "react";
3+
4+
interface IFont {
5+
style: React.CSSProperties["fontStyle"];
6+
weight: React.CSSProperties["fontWeight"];
7+
urls: string[];
8+
}
9+
10+
const fonts: IFont[] = [
11+
{
12+
style: "italic",
13+
weight: 100,
14+
urls: [
15+
"https://fonts.gstatic.com/s/poppins/v23/pxiAyp8kv8JHgFVrJJLmE0tDMPKzSQ.woff2",
16+
"https://fonts.gstatic.com/s/poppins/v23/pxiAyp8kv8JHgFVrJJLmE0tMMPKzSQ.woff2",
17+
"https://fonts.gstatic.com/s/poppins/v23/pxiAyp8kv8JHgFVrJJLmE0tCMPI.woff2"
18+
]
19+
},
20+
{
21+
style: "italic",
22+
weight: 200,
23+
urls: [
24+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmv1pVFteOcEg.woff2",
25+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmv1pVGdeOcEg.woff2",
26+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmv1pVF9eO.woff2"
27+
]
28+
},
29+
{
30+
style: "italic",
31+
weight: 300,
32+
urls: [
33+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm21lVFteOcEg.woff2",
34+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm21lVGdeOcEg.woff2",
35+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm21lVF9eO.woff2"
36+
]
37+
},
38+
{
39+
style: "italic",
40+
weight: 400,
41+
urls: [
42+
"https://fonts.gstatic.com/s/poppins/v23/pxiGyp8kv8JHgFVrJJLucXtAKPY.woff2",
43+
"https://fonts.gstatic.com/s/poppins/v23/pxiGyp8kv8JHgFVrJJLufntAKPY.woff2",
44+
"https://fonts.gstatic.com/s/poppins/v23/pxiGyp8kv8JHgFVrJJLucHtA.woff2"
45+
]
46+
},
47+
{
48+
style: "italic",
49+
weight: 500,
50+
urls: [
51+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmg1hVFteOcEg.woff2",
52+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmg1hVGdeOcEg.woff2",
53+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmg1hVF9eO.woff2"
54+
]
55+
},
56+
{
57+
style: "italic",
58+
weight: 600,
59+
urls: [
60+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmr19VFteOcEg.woff2",
61+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmr19VGdeOcEg.woff2",
62+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmr19VF9eO.woff2"
63+
]
64+
},
65+
{
66+
style: "italic",
67+
weight: 700,
68+
urls: [
69+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmy15VFteOcEg.woff2",
70+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmy15VGdeOcEg.woff2",
71+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLmy15VF9eO.woff2"
72+
]
73+
},
74+
{
75+
style: "italic",
76+
weight: 800,
77+
urls: [
78+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm111VFteOcEg.woff2",
79+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm111VGdeOcEg.woff2",
80+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm111VF9eO.woff2"
81+
]
82+
},
83+
{
84+
style: "italic",
85+
weight: 900,
86+
urls: [
87+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm81xVFteOcEg.woff2",
88+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm81xVGdeOcEg.woff2",
89+
"https://fonts.gstatic.com/s/poppins/v23/pxiDyp8kv8JHgFVrJJLm81xVF9eO.woff2"
90+
]
91+
},
92+
{
93+
style: "normal",
94+
weight: 100,
95+
urls: [
96+
"https://fonts.gstatic.com/s/poppins/v23/pxiGyp8kv8JHgFVrLPTucXtAKPY.woff2",
97+
"https://fonts.gstatic.com/s/poppins/v23/pxiGyp8kv8JHgFVrLPTufntAKPY.woff2",
98+
"https://fonts.gstatic.com/s/poppins/v23/pxiGyp8kv8JHgFVrLPTucHtA.woff2"
99+
]
100+
},
101+
{
102+
style: "normal",
103+
weight: 200,
104+
urls: [
105+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLFj_Z11lFc-K.woff2",
106+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLFj_Z1JlFc-K.woff2",
107+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLFj_Z1xlFQ.woff2"
108+
]
109+
},
110+
{
111+
style: "normal",
112+
weight: 300,
113+
urls: [
114+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLDz8Z11lFc-K.woff2",
115+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLDz8Z1JlFc-K.woff2",
116+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2"
117+
]
118+
},
119+
{
120+
style: "normal",
121+
weight: 400,
122+
urls: [
123+
"https://fonts.gstatic.com/s/poppins/v23/pxiEyp8kv8JHgFVrJJbecmNE.woff2",
124+
"https://fonts.gstatic.com/s/poppins/v23/pxiEyp8kv8JHgFVrJJnecmNE.woff2",
125+
"https://fonts.gstatic.com/s/poppins/v23/pxiEyp8kv8JHgFVrJJfecg.woff2"
126+
]
127+
},
128+
{
129+
style: "normal",
130+
weight: 500,
131+
urls: [
132+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLGT9Z11lFc-K.woff2",
133+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLGT9Z1JlFc-K.woff2",
134+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2"
135+
]
136+
},
137+
{
138+
style: "normal",
139+
weight: 600,
140+
urls: [
141+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLEj6Z11lFc-K.woff2",
142+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2",
143+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2"
144+
]
145+
},
146+
{
147+
style: "normal",
148+
weight: 700,
149+
urls: [
150+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLCz7Z11lFc-K.woff2",
151+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2",
152+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2"
153+
]
154+
},
155+
{
156+
style: "normal",
157+
weight: 800,
158+
urls: [
159+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLDD4Z11lFc-K.woff2",
160+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLDD4Z1JlFc-K.woff2",
161+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2"
162+
]
163+
},
164+
{
165+
style: "normal",
166+
weight: 900,
167+
urls: [
168+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLBT5Z11lFc-K.woff2",
169+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLBT5Z1JlFc-K.woff2",
170+
"https://fonts.gstatic.com/s/poppins/v23/pxiByp8kv8JHgFVrLBT5Z1xlFQ.woff2"
171+
]
172+
}
173+
];
174+
175+
export default function Fonts() {
176+
const family = "Poppins";
177+
const fallback = "serif";
178+
return (
179+
<>
180+
{fonts.map((v, i) =>
181+
v.urls.map((url, ui) => (
182+
<Font
183+
key={`${i}-${ui}`}
184+
fontFamily={family}
185+
fallbackFontFamily={fallback}
186+
webFont={{ url, format: "woff2" }}
187+
fontStyle={v.style}
188+
fontWeight={v.weight}
189+
/>
190+
))
191+
)}
192+
{/* <Font
193+
fontFamily="Poppins"
194+
fallbackFontFamily={fallback}
195+
webFont={{
196+
url: "https://fonts.gstatic.com/s/poppins/v23/pxiAyp8kv8JHgFVrJJLmE0tDMPKzSQ.woff2",
197+
format: "woff2"
198+
}}
199+
fontStyle="italic"
200+
fontWeight={100}
201+
/>
202+
<Font
203+
fontFamily="Poppins"
204+
fallbackFontFamily={fallback}
205+
webFont={{
206+
url: "https://fonts.gstatic.com/s/poppins/v23/pxiAyp8kv8JHgFVrJJLmE0tMMPKzSQ.woff2",
207+
format: "woff2"
208+
}}
209+
fontStyle="italic"
210+
fontWeight={100}
211+
/>
212+
<Font
213+
fontFamily="Poppins"
214+
fallbackFontFamily={fallback}
215+
webFont={{
216+
url: "https://fonts.gstatic.com/s/poppins/v23/pxiAyp8kv8JHgFVrJJLmE0tCMPI.woff2",
217+
format: "woff2"
218+
}}
219+
fontStyle="italic"
220+
fontWeight={100}
221+
/> */}
222+
</>
223+
);
224+
}

0 commit comments

Comments
 (0)