Frontend Docs - hemanth-sunkireddy/Invoice-Management-System GitHub Wiki
SWIPE Automatic Invoice Management Frontend
Setup Frontend
- Change Backend URL to local backend URL:
- Go to
frontend/config.tsx
file and Update the following line to localhost backend URL
toexport const backendURL = "https://swipe-invoice-management.vercel.app";
export const backendURL = "http://localhost:4000";
- Go to
- Start App
cd frontend
npm install
npm run dev
- Open link in browser:
http://localhost:3000
Please visit the Frontend Documentation for a detailed overview of the code: Frontend Docs wiki
Details about the frontend code
Folder Structure
(base) hemanth@Sunkireddy frontend % tree
.
βββ README.md
βββ config.tsx
βββ next-env.d.ts
βββ next.config.mjs
βββ package-lock.json
βββ package.json
βββ postcss.config.mjs
βββ public
β βββ images
β βββ center-image-home.webp
β βββ home-page.png
β βββ swipe-logo.svg
β βββ swipe_logo.png
βββ src
β βββ app
β β βββ customers
β β β βββ page.tsx
β β βββ file-upload
β β β βββ page.tsx
β β βββ globals.css
β β βββ invoice-detail
β β β βββ page.tsx
β β βββ invoices
β β β βββ page.tsx
β β βββ layout.tsx
β β βββ page.tsx
β β βββ products
β β βββ page.tsx
β βββ components
β β βββ Container.tsx
β β βββ Footer.tsx
β β βββ Header.tsx
β β βββ Hero.tsx
β βββ data
β β βββ footer.ts
β β βββ hero.ts
β β βββ menuItems.ts
β β βββ siteDetails.ts
β βββ types.ts
βββ tailwind.config.ts
βββ tsconfig.json
File Descriptions
-
config.tsx: Contains configuration variables like backend URLs used for API requests.
-
public/images: Stores static images used in the project.
-
src/app/page.tsx: The main entry point of the app (homepage).
-
src/app/layout.tsx: Defines the global layout, including headers and footers.
-
src/app/customers/page.tsx: Displays List of customers. (Customer Tab)
-
src/app/file-upload/page.tsx: Handles different file uploads and display response message from server.
-
src/app/invoices/page.tsx: Lists all invoices. (Invoice Tab)
-
src/app/products/page.tsx: Displays all Products. (Products Tab)
-
src/components/Footer.tsx: Renders the footer section.
-
src/data/footer.ts: Stores footer-related data.
-
src/components/Header.tsx: Displays the siteβs header and navigation bar.
-
src/types.ts: Defines TypeScript types used across the app for invoices, customers and products.
Template I used for this project: Finwise Landing template