Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test and Deploy to Vercel

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
test-and-build:
Expand All @@ -16,8 +16,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm ci
Expand All @@ -42,12 +42,12 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
vercel-args: "--prod"
6 changes: 6 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.{js,ts,jsx,tsx}": [
"eslint --fix",
"prettier --write"
]
}
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ A modern, intelligent invoicing web app for freelancers and small businesses —

Built with **Next.js 15**, **TypeScript**, **Tailwind CSS**, **shadcn/ui**, **NextAuth**, and **Prisma (MongoDB)**.


**Live Demo:** [https://billq.vercel.app]

---

## 🚀 Features Implemented

### 🔐 Authentication

- Email/password authentication using **NextAuth**.
- Session management integrated with Prisma user model.
- User profile and company info stored in MongoDB.

### 🧾 Invoices

- **Invoice CRUD:** Create, view, and edit invoices.
- **Invoice Preview Page:** Responsive layout with itemized details, client info, and summary totals.
- **Download as PDF:** Users can download invoice previews as a PDF using a custom `printPDF()` utility.
Expand All @@ -26,13 +27,15 @@ Built with **Next.js 15**, **TypeScript**, **Tailwind CSS**, **shadcn/ui**, **Ne
- Fetches user and client information directly from the database via Prisma.

### 💰 Clients

- Each invoice is linked to a specific client.
- Client details (name, email, address) are rendered dynamically.


### 💾 Database Schema

Using **Prisma ORM** with a **MongoDB** adapter.
Main models include:

- `User`
- `Client`
- `Invoice`
Expand All @@ -45,8 +48,8 @@ To get a local copy up and running, follow these simple steps.

### Prerequisites

* Node.js (v22)
* npm or yarn
- Node.js (v22)
- npm or yarn

### Installation

Expand Down Expand Up @@ -84,14 +87,17 @@ To get a local copy up and running, follow these simple steps.
### Running the Application

Start the development server:

```sh
npm run dev
```

Open http://localhost:3000 to view it in the browser.

### Running Tests

To run the component and integration tests, use the following command:

```sh
npm run test
```

6 changes: 5 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const compat = new FlatCompat({
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
...compat.extends(
"next/core-web-vitals",
"next/typescript",
"plugin:prettier/recommend",
),
{
ignores: [
"node_modules/**",
Expand Down
6 changes: 2 additions & 4 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import type { NextConfig } from "next";

const nextConfig: NextConfig = {
images: {
remotePatterns: [
new URL('https://lh3.googleusercontent.com/**')
]
}
remotePatterns: [new URL("https://lh3.googleusercontent.com/**")],
},
};

export default nextConfig;
Loading
Loading