A modern, full-stack invoice generation and management system built with Next.js, TypeScript, and MySQL.
- Create, edit, and manage invoices
- Generate PDF invoices
- Customer and product management
- User authentication and authorization
- Responsive design for all devices
Before you begin, ensure you have the following installed:
- Node.js (v14 or later)
- npm (v7 or later) or yarn
- MySQL Server (v5.7 or later)
- XAMPP (for local development, optional but recommended)
git clone <repository-url>
cd invoice_generatornpm install
# or
yarn installCreate a .env file in the root directory with the following variables:
MYSQL_HOST=localhost
MYSQL_USER=your_mysql_username
MYSQL_PASSWORD=your_mysql_password
MYSQL_DATABASE=invoice_generator
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000- Start XAMPP Control Panel
- Start Apache and MySQL services
- Open phpMyAdmin (usually at http://localhost/phpmyadmin)
- Create a new database named
invoice_generator
- Connect to your MySQL server:
mysql -u root -p
- Create the database:
CREATE DATABASE invoice_generator;
Run the following command to execute database migrations:
npx sequelize-cli db:migrateTo populate the database with sample data:
npx sequelize-cli db:seed:allStart the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 in your browser to see the application.
npm run dev- Start the development servernpm run build- Build the application for productionnpm start- Start the production servernpm run lint- Run ESLintnpx sequelize-cli db:create- Create the databasenpx sequelize-cli db:migrate- Run database migrationsnpx sequelize-cli db:seed:all- Seed the database
.
├── app/ # Next.js 13+ app directory
├── components/ # Reusable UI components
├── database/ # Database configuration and models
│ ├── migrations/ # Database migration files
│ ├── models/ # Sequelize models
│ └── seeders/ # Database seed files
├── lib/ # Utility functions and helpers
├── pages/ # Next.js pages
├── public/ # Static files
└── services/ # Business logic and API services
MYSQL_HOST- MySQL server hostMYSQL_USER- MySQL usernameMYSQL_PASSWORD- MySQL passwordMYSQL_DATABASE- Database nameNEXTAUTH_SECRET- Secret for NextAuth.jsNEXTAUTH_URL- Base URL of your application
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.