A modern, fully-featured authentication system built with SvelteKit and Tailwind CSS. This project provides a complete login, registration, and password recovery solution with a beautiful, responsive UI and dark mode support.
Keywords: svelte auth, sveltekit authentication, login system, user authentication, sveltekit starter, authentication template, typescript auth, tailwind css login
# Clone the repository
git clone https://github.com/your-username/sveltekit-auth-example.git
# Navigate to project directory
cd sveltekit-auth-example
# Install dependencies
npm install
# Start development server
npm run dev
Here are screenshots of the authentication pages:
Demo screenshots coming soon
You can see the beautiful UI with dark mode support and responsive design on all pages.
/): Landing page with call-to-action for registration/login): Secure login form with username/email and password/register): User registration form with full name, email, and password/forgot-password): Password recovery functionalitynpm install
To start the development server:
npm run dev
Or to open the app in a new browser tab:
npm run dev -- --open
To create a production version of the app:
npm run build
You can preview the production build with:
npm run preview
src/
├── app.html # HTML template
├── app.d.ts # TypeScript declarations
├── lib/ # Shared components, utilities, and server-side code
│ ├── assets/ # Static assets (images, icons)
│ └── server/ # Server-side utilities (database)
├── routes/ # Page routes and layouts
│ ├── +layout.svelte # Root layout
│ ├── +page.svelte # Home page
│ ├── login/ # Login page
│ ├── register/ # Registration page
│ └── forgot-password/ # Password recovery
└── routes
This project uses a simple JSON-based database implementation in src/lib/server/db.ts for demonstration purposes. In a production environment, you would replace this with a proper database system (PostgreSQL, MySQL, MongoDB, etc.) and implement proper password hashing.
src/routes/layout.css to adjust Tailwind configurationsrc/lib/assets/+page.server.ts files+layout.svelte for global layout changesFeel free to open issues and submit pull requests. All contributions are welcome!
npm run dev - Start development servernpm run build - Create production buildnpm run preview - Preview production build locallynpm run check - Type check and validate componentsnpm run format - Format code with Prettiernpm run lint - Check code formatting and linting