A loan guarantor application where a company agent logs in and distribute loans to customers
- Next.js 13
- Next Auth
- Zod for schema validation
- Tailwindcss & Shadcn ui
- Prisma with Postgresql database
- Git clone the repository by running the following commands below at your preffered destination
git clone https://github.com/danielkpodo/loan-guarantor.git- If you have setup ssh-keys on your github account run
git clone git@github.com:danielkpodo/loan-guarantor.git- In the root of your application add the following
.envenvironment variables
DATABASE_URL="postgresql://< your postgres username>:<your postgres password>@localhost:5432/loanApp?schema=public"
NEXTAUTH_SECRET=<any random base64 string>
NEXTAUTH_URL=http://localhost:3000
NODE_ENV=development- To create a random base64 on a mac run the below command in your terminal
- Put the output as your
NEXTAUTH_URLin the.env
openssl rand -base64 32- In the root of your application run the below command to install project dependencies
npm install or yarn install- Next, run the below command in your project terminal to migrate the prisma models in
prisma/schema.prismato populate your database
npx prisma migrate dev --name init
- Now run the project by running
npm run dev
- To build the project and enjoy lightning fast speed run the command below
npm run build-
Next run
npm run startafter the build is successful and complete -
Your project should now start on a given port. You should see this in your terminal
- Install the extension
REST clientin vscode or use postman to create a test user as shown below - Use the created password to login into the application portal
POST http://localhost:3000/api/users/register
Content-Type: application/json
{
"email": "someone@example.com",
"password": "randompasscode"
}