Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions apps/api/src/locales/@vitnode/blog/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"@vitnode/blog": {
"title": "Blog",
"admin": {
"nav": {
"posts": "Posts",
"categories": "Categories"
},
"categories": {
"desc": "Manage categories for blog posts.",
"table": {
"title": "Title",
"updated_at": "Updated At"
},
"delete": {
"title": "Delete Category",
"desc": "Are you sure you want to delete <title></title> category? This action cannot be undone.",
"confirm": "Yes, delete this category",
"success": "Category has been deleted successfully."
},
"create": {
"title": "Create Category",
"desc": "A new category for your blog posts.",
"form": {
"title": {
"label": "Title",
"already_exists": "This category title already exists."
}
},
"submit": "Create"
},
"edit": {
"title": "Edit Category",
"submit": "Save Changes"
}
},
"posts": {
"desc": "Write and manage your blog posts.",
"table": {
"title": "Title",
"category": "Category",
"updated_at": "Updated At"
},
"create": {
"title": "Create Post",
"desc": "Write a new article for your blog.",
"form": {
"title": {
"label": "Title",
"already_exists": "This post title already exists."
},
"content": "Content",
"category": "Category"
},
"submit": "Create Post"
},
"edit": {
"title": "Edit Post",
"submit": "Save Changes"
},
"delete": {
"title": "Delete Post",
"desc": "Are you sure you want to delete <title></title> post? This action cannot be undone.",
"confirm": "Yes, delete this post",
"success": "Post has been deleted successfully."
}
}
}
}
}
217 changes: 217 additions & 0 deletions apps/api/src/locales/@vitnode/core/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
{
"core": {
"global": {
"theme_switcher": "Toggle Theme",
"language_switcher": "Switch Language",
"toggle_sidebar": "Toggle Sidebar",
"no_results": {
"title": "No results found",
"desc": "Try adjusting your search or filter criteria."
},
"are_you_sure_want_to_leave_form": {
"title": "Are you sure you want to leave this form?",
"desc": "Your changes will not be saved.",
"cancel": "Cancel",
"confirm": "Yes, leave"
},
"confirm_action": {
"title": "Are you sure?",
"desc": "This action cannot be undone.",
"cancel": "Cancel",
"confirm": "Yes, confirm"
},
"search_placeholder": "Search...",
"results_not_found": "No results found",
"date": "{date, date}",
"date_medium": "{date, date, medium}",
"date_short": "{date, date, short}",
"register": "Register",
"login": "Login",
"save": "Save",
"submit": "Submit",
"cancel": "Cancel",
"optional": "Optional",
"loading": "Loading...",
"or": "or",
"back_home": "Back to home",
"go_back": "Go back",
"select_option": "Select an option",
"select_options": "Select options",
"go_to_prev_page": "Go to previous page",
"go_to_next_page": "Go to next page",
"errors": {
"title": "Oops! Something went wrong.",
"internal_server_error": "Internal server error.",
"field_required": "This field is required.",
"field_min_length": "This field must be at least {min} characters.",
"captcha_internal_error": "Captcha validation failed. Please try again later.",
"404": {
"title": "Page Not Found",
"desc": "Oops! The page you're looking for doesn't exist."
},
"500": {
"title": "Internal Server Error",
"desc": "Sorry, we're experiencing technical difficulties on our server."
},
"400": {
"title": "Bad Request",
"desc": "The request couldn't be processed due to invalid parameters."
},
"403": {
"title": "Forbidden",
"desc": "You don't have permission to access this resource."
}
},
"user_bar": {
"log_out": "Log out",
"admin_cp": "Admin CP"
}
},
"auth": {
"sso": {
"or": "Or continue With",
"access_denied": "You have denied access to the application or the request has expired. Please try again."
},
"sign_up": {
"desc": "Hello there! Create your account to get started.",
"already_have_account": "You already have an account? <link>Sign in</link>.",
"submit": "Register",
"username": {
"label": "Username",
"min_length": "Username must be at least 3 characters long.",
"max_length": "Username must be at most 32 characters long.",
"exists": "Username already exists.",
"your_user_code": "Your user code: <code></code>"
},
"email": {
"label": "Email",
"invalid": "Invalid email address.",
"exists": "Email already exists."
},
"password": {
"label": "Password",
"invalid": "Password is too weak.",
"requirements": {
"label": "Password should contain:",
"min_length": "At least 8 characters",
"uppercase": "At least one uppercase letter",
"number": "At least one number",
"special_char": "At least one special character"
}
},
"terms": {
"label": "Accept terms and conditions",
"required": "You must accept the terms and conditions.",
"desc": "You agree to our <link>Legal documents & Policies</link>."
},
"newsletter": {
"label": "Newsletter",
"desc": "Receive the latest news and updates."
},
"email_confirmation": {
"title": "Check your email",
"desc": "We've sent a confirmation link to your email address",
"check_spam": "If you don't see the email in your inbox, please check your spam folder."
}
},
"sign_in": {
"desc": "Welcome back! Sign in to your account.",
"do_not_have_account": "Don't have an account? <link>Sign up</link>.",
"email": {
"label": "Email",
"invalid": "Invalid email address."
},
"password": {
"label": "Password",
"required": "Password is required."
},
"errors": {
"access_denied": {
"title": "Invalid credentials",
"desc": "The email address or password was incorrect. Please try again (make sure your caps lock is off)."
}
},
"submit": "Login"
}
}
},
"admin": {
"dashboard": {
"dev_mode": "Development Mode",
"version": "Version: {version}"
},
"global": {
"nav": {
"core": "Core",
"dashboard": "Dashboard",
"users": {
"title": "Users",
"list": "User List"
},
"user_bar": {
"home_page": "Home Page",
"debug": "Debug Panel",
"log_out": "Log Out"
}
}
},
"user": {
"list": {
"desc": "Manage users of your application.",
"user": "User",
"createdAt": "Created At",
"emailNotVerified": "Email Not Verified"
}
},
"debug": {
"title": "Debug Panel",
"desc": "Check logs, errors, and other debug information.",
"actions": {
"clear_cache": {
"label": "Clear Cache",
"title": "Are you sure you want to clear the cache?",
"desc": "This action will remove all cached data, which may affect performance temporarily.",
"success": "Cache cleared successfully.",
"confirm": "Yes, clear cache"
}
},
"logs": {
"title": "System Logs",
"created_at": "Created At",
"plugin": "Plugin",
"content": "Content",
"type": "Type",
"types": {
"warn": "Warning",
"error": "Error",
"debug": "Debug"
},
"status_code": "Status Code",
"more": {
"title": "More Details",
"desc": "Log ID: <logId></logId>",
"log_overview": {
"title": "Log Overview",
"log_type": "Log Type",
"status_code": "Status Code",
"log_id": "Log ID",
"created_at": "Created At",
"plugin": "Plugin",
"user": "User"
},
"request_information": {
"title": "Request Information",
"ip_address": "IP Address",
"request_method": "Request Method",
"request_url": "Request URL",
"user_agent": "User Agent"
},
"log_content": {
"title": "Log Content",
"full_log": "Full Log Message"
}
}
}
}
}
}
10 changes: 10 additions & 0 deletions apps/api/src/vitnode.api.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NodemailerEmailAdapter } from '@vitnode/core/api/adapters/email/nodemailer';
import { buildApiConfig } from '@vitnode/core/vitnode.config';
import * as dotenv from 'dotenv';
import { drizzle } from 'drizzle-orm/postgres-js';
Expand All @@ -12,10 +13,19 @@ export const POSTGRES_URL =

export const vitNodeApiConfig = buildApiConfig({
plugins: [],
pathToMessages: async path => await import(`./locales/${path}`),
dbProvider: drizzle({
connection: POSTGRES_URL,
casing: 'camelCase',
}),
email: {
adapter: NodemailerEmailAdapter({
from: process.env.NODE_MAILER_FROM,
host: process.env.NODE_MAILER_HOST,
password: process.env.NODE_MAILER_PASSWORD,
user: process.env.NOD_EMAILER_USER,
}),
},
metadata: {
title: 'VitNode API',
shortTitle: 'VitNode',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/app/[locale]/(main)/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const metadata: Metadata = {
export default function HomePage() {
return (
<div className="container">
<section className="border-border/50 mt-10 flex flex-col justify-between gap-20 border-r bg-[linear-gradient(to_right,color-mix(in_oklab,var(--border)_75%,transparent)_1px,transparent_1px),linear-gradient(to_bottom,color-mix(in_oklab,var(--border)_75%,transparent)_1px,transparent_1px)] bg-[size:63px_63px] px-10 py-20 lg:flex-row dark:bg-[linear-gradient(to_right,color-mix(in_oklab,var(--border)_50%,transparent)_1px,transparent_1px),linear-gradient(to_bottom,color-mix(in_oklab,var(--border)_50%,transparent)_1px,transparent_1px)]">
<section className="border-border/50 mt-6 flex flex-col justify-between gap-20 border-r bg-[linear-gradient(to_right,color-mix(in_oklab,var(--border)_75%,transparent)_1px,transparent_1px),linear-gradient(to_bottom,color-mix(in_oklab,var(--border)_75%,transparent)_1px,transparent_1px)] bg-[size:63px_63px] px-6 py-10 sm:mt-10 sm:px-10 sm:py-20 lg:flex-row dark:bg-[linear-gradient(to_right,color-mix(in_oklab,var(--border)_50%,transparent)_1px,transparent_1px),linear-gradient(to_bottom,color-mix(in_oklab,var(--border)_50%,transparent)_1px,transparent_1px)]">
<div className="flex max-w-2xl flex-col">
<h1 className="text-balance text-5xl font-semibold tracking-tight sm:text-6xl">
Extendable <span className="text-primary">Framework</span> for
Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/vitnode.api.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const POSTGRES_URL =
process.env.POSTGRES_URL || 'postgresql://root:root@localhost:5432/vitnode';

export const vitNodeApiConfig = buildApiConfig({
pathToMessages: async path => await import(`./locales/${path}`),
captcha: {
type: 'cloudflare_turnstile',
siteKey: process.env.CLOUDFLARE_TURNSTILE_SITE_KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const POSTGRES_URL =
process.env.POSTGRES_URL || 'postgresql://root:root@localhost:5432/vitnode';

export const vitNodeApiConfig = buildApiConfig({
pathToMessages: async path => await import(`./locales/${path}`),
metadata: {
title: 'VitNode',
shortTitle: 'VitNode',
Expand Down
21 changes: 18 additions & 3 deletions packages/create-vitnode-app/src/create/create-vitnode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,26 @@ export const createVitNode = async ({
cwd: root,
});

if (mode !== 'onlyApi') {
spinner.text = 'Initializing VitNode files...';
spinner.text = 'Initializing VitNode files...';
if (mode === 'apiMonorepo') {
await Promise.all([
initFilesVitnode({
packageManager,
cwd: monorepoStructure.web,
}),
initFilesVitnode({
packageManager,
cwd: monorepoStructure.api,
}),
initFilesVitnode({
packageManager,
cwd: root,
}),
]);
} else {
initFilesVitnode({
packageManager,
cwd: mode === 'apiMonorepo' || monorepo ? monorepoStructure.web : root,
cwd: root,
});
}

Expand Down
3 changes: 2 additions & 1 deletion packages/vitnode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"drizzle-kit": "0.31.x",
"drizzle-orm": "^0.44.x",
"hono": "4.8.x",
"motion": "^12.x.x",
"next": "15.3.x",
"next-intl": "4.x.x",
"react": "19.1.x",
"react-dom": "19.1.x",
"react-hook-form": "^7.x.x",
"motion": "^12.x.x",
"typescript": "^5.8.x",
"zod": "4.x.x"
},
Expand Down Expand Up @@ -126,6 +126,7 @@
"resend": "^4.7.0",
"tailwind-merge": "^3.3.1",
"use-debounce": "^10.0.5",
"use-intl": "^4.3.4",
"vaul": "^1.1.2"
}
}
Loading