sveltekit-mongodb Svelte Themes

Sveltekit Mongodb

A simple web app that built with Svelte 5, MongoDB and TypeScript with features such as contact with nodemailer, realtime pagination and search.

Simple Sveltekit App with MongoDB and TypeScript

This is main branch, you can also check svelte-4 branch to see svelte 4 version. Live Demo (The site may open slowly because I deployed the project to a free hosting server. To avoid problems that may arise due to a slow connection and to be able to use features that are not available in the demo, I recommend that you download the project to your machine and try it.)

Table of Contents

  1. Introduction
  2. Features
  3. Installation & Setup

Introduction

The main purpose of this project is to learn how to use MongoDB with Sveltekit so it is very simple and detailed with comments. I used MongoDB Atlas for the database and Nodemailer for the contact form.

sveltekit-mongodb

Features

  • Realtime Pagination and Search
  • Contact with Nodemailer

Installation & Setup

  1. Clone the repository
    git clone https://github.com/bberkay/sveltekit-mongodb.git
    
  2. Navigate to the project directory and install the dependencies
    cd sveltekit-mongodb
    npm install
    
  3. Create a .env file like this in the root directory and add the following variables
    MAIL_HOST = <your_host>
    MAIL_PORT = <your_port>
    MAIL_USERNAME = <your_username>
    MAIL_PASSWORD = <your_password>
    MONGO_URL = <your_mongodb_url>
    
  4. Run the project
    npm run dev
    

[email protected]

Top categories

Loading Svelte Themes