Svelte5-TrainingKit Svelte Themes

Svelte5 Trainingkit

⚔ Svelte-5 Internship Training Project

This project is part of SvelteKit 5 Training provided by API PLUS TECH Co., Ltd. It serves as a pre-internship submission

Features

šŸ“ø Demo

šŸ§‘ā€šŸ’» User Views

šŸ  Home Page

šŸ›ļø Product Page

šŸ’³ Purchase Page


šŸ› ļø Admin Views

šŸ“Š Dashboard

šŸ“¦ Product Management

šŸ‘„ Customer List

šŸ› ļø Tech Stack

  • Frontend: Svelte 5, Tailwind CSS, Shadcn UI
  • Backend: Prisma, Lucia Auth, Stripe
  • Language: TypeScript
  • Form Handling: Superform
  • Icons: Lucide Icons

šŸ“‚ Project Structure

project-name/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ lib/             # Shared logic, components, stores
│   ā”œā”€ā”€ routes/          # Pages and endpoints
│   ā”œā”€ā”€ hooks.server.ts  # Server hooks (e.g., for auth)
│   └── app.d.ts         # TypeScript types
ā”œā”€ā”€ static/              # Public assets
ā”œā”€ā”€ prisma/              # Prisma schema and migrations
ā”œā”€ā”€ .env         # Environment variable
ā”œā”€ā”€ svelte.config.js     # SvelteKit config
ā”œā”€ā”€ tailwind.config.ts   # Tailwind config
└── ...

āš™ļø Setup & Installation

1. Clone the repository

git clone https://github.com/Mysterioucz/Svelte5-TrainingKit.git
cd Svelte5-TrainingKit

2. Install dependencies

npm install

3. Configure environment variables

Provide your credentials in .env (Stripe keys, Public server URL, Database URL): For Examples

DATABASE_URL="file:./dev.db"

PUBLIC_STRIPE_PUBLIC_KEY = Your Stripe Public Key
STRIPE_SECRET_KEY = Your Stripe Secret Key
PUBLIC_SERVER_URL = http://127.0.0.1:5173 # The URL of your server, used for webhooks and redirects.

4. Setup the database

npx prisma generate
npx prisma migrate dev

5. Run the development server

npm run dev

The app will be available at http://127.0.0.1:5173 (or the port SvelteKit uses).

6. For login you can use admin account or create your own user account

User: admin
Password: password

šŸ“Ž API Routes

Method Endpoint Description
POST /api/payment Handle Stripe payments
POST /login User login
GET /dashboard Protected user dashboard

šŸ™‹ā€ā™‚ļø Author


šŸ“Ø Feel free to open an issue or contact me if you have any questions or feedback!

Top categories

Loading Svelte Themes