This repository contains a Nuxt.js project designed to teach users how to utilize FakerJS for data seeding in a SQLite database.
- FakerJS Integration: Learn how to generate fake data using FakerJS.
- Nitro Tasks: Leverage Nitro Tasks UI within the Nuxt DevTools, to run the seeder in the server.
- Nuxt Prisma Module: Setup prisma for database interactions, and use Nuxt DevTools to visualise your Prisma models.
To get started with this project, follow the steps below:
- Install dependencies
# pnpm
pnpm install
# npm
npm install
- Setup the environment file
cp .env.example .env
- Initialize your database
pnpx prisma migrate dev
- Run the development server
# pnpm
pnpm dev
# npm
npm run dev
- Access the Application:
Open your browser and go to http://localhost:3000 to access the application.
- Opening the Server Tasks and Prisma Dashboards:
First open the Nuxt DevTools by clicking on the Nuxt icon at the bottom of the page:

Then from within the DevTools, click on the 3 vertical dots:

The Server Tasks and Prisma Dashboards are available upon pressing these buttons:

- Running just the Seeder:
- Within the Server Tasks dashboard click on "db:seed"
- Press "Run Task"
- By default the runner used is "pnpx", if you want to use a different runner (e.g.
npx
), you can do so by passing arunner
payload to the task.
