Skip to content

Simple invoice generator built using Next.js, Prisma, Tailwind CSS, & PostgreSQL (no DB provided in hosted demo)

Notifications You must be signed in to change notification settings

jahabeebs/invoice-generator

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server (we'll use yarn for consistency):

yarn dev

Open http://localhost:3000 with your browser to see the result.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Database Configuration Instructions

First, create a free Heroku PostgreSQL database. This will make it easy to configure a DB for testing without configuring a database on your local computer.

Next, create a .env file with the same format as .env.example, and replace the DATABASE_URL value in your .env with the DATABASE_URL of your Heroku DB (found in your Heroku settings)

Then, use the following instructions to configure Prisma with your Heroku DB:

  1. Run yarn prisma db push to create the DB tables as specified in schema.prisma
  2. Run yarn prisma studio to view the DB tables and easily add/delete dummy data

If you don't want to create a Heroku database, you can just create a local PostgreSQL DB and do the following:

  1. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
  2. Run yarn prisma db push to create the DB tables as specified in schema.prisma
  3. Run yarn prisma studio to view the DB tables and easily add/delete dummy data

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Simple invoice generator built using Next.js, Prisma, Tailwind CSS, & PostgreSQL (no DB provided in hosted demo)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published