A modern web application that allows users to generate personalized virtual debit cards with their name or username. Users can view both front and back sides of the card, download the images, and share directly to Twitter.
```bash
npx create-next-app@latest debit-card-generator ```
During the setup, select the following options:
src/
directory? No```bash cd debit-card-generator ```
```bash
npm install -D @shadcn/ui
npx shadcn@latest init
npx shadcn@latest add button input label tabs switch
npm install html-to-image lucide-react react-signature-canvas npm install -D @types/react-signature-canvas ```
Create the following directory structure:
``` debit-card-generator/ ├── app/ │ ├── globals.css │ ├── layout.tsx │ └── page.tsx ├── components/ │ ├── card-back.tsx │ ├── card-front.tsx │ ├── card-generator.tsx │ ├── signature-pad.tsx │ └── ui/ │ ├── button.tsx │ ├── input.tsx │ ├── label.tsx │ ├── switch.tsx │ └── tabs.tsx ├── lib/ │ └── utils.ts ├── public/ ├── tailwind.config.ts └── next.config.js
Update the card components to include the signature functionality.
```bash npm run dev ```
Visit http://localhost:3000
in your browser to see the application running.
When you’re ready to deploy your application:
```bash npm run build ```
This will create an optimized production build in the .next
folder.
The easiest way to deploy your Next.js app is to use the Vercel Platform.
```bash
npm install -g vercel
vercel
Follow the prompts to deploy your application.
You can modify the signature font by changing the imported font in app/layout.tsx
:
You can modify the text and styling in the card-back.tsx
file:
This project is licensed under the MIT License - see the LICENSE file for details.