Skip to content

Repository files navigation

Next.js Prisma App with PostgreSQL

This Next.js project uses Prisma ORM for database interactions and handles file uploads.

The .env file has been included to connect the database/user/password.

This would not normally be done outside of a challenge.

Before you begin, install NodeJS

Getting Started

  1. Install PostgreSQL:

    /bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))"
    brew install postgresql
    brew services start postgresql
    createdb mydb
    psql -d mydb
    
  2. Create a PostgreSQL User:

  3. Install PostgreSQL:

    /bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))"
    brew install postgresql
    brew services start postgresql
    createdb mydb
    psql -d mydb
    
  4. Create a PostgreSQL User:

    psql postgres
    # or sudo -u postgres psql
    CREATE USER 'myuser' WITH PASSWORD 'mypassword' SUPERUSER;
    \du
    

    _Update your .env with these credentials.

  5. Install Dependencies:

    npm install # or yarn install or pnpm install
    
  6. Generate Prisma Client & Run Migrations:

    npx prisma generate
    npx prisma migrate dev --name init
  7. Run the Development Server:

    npm run dev # or yarn dev or pnpm dev or bun dev

    Open http://localhost:3000.


Developing Further (If I Had More Time)

  • Implement user authentication. NextJS Auth
  • Improve form validation and error handling.
  • Add confirmation notifications for submissions.
  • Add feedback while submitting
  • Display current user attributes
  • Enhance UI/UX.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages