A modern, professional Next.js application for Innovaas Solutions, featuring server-side rendering, authentication, and an internal employee resources portal.
The Innovaas Website is built with Next.js 14 using the App Router, providing a fast, SEO-friendly web experience with server-side rendering capabilities. The project includes public-facing pages for clients and an internal employee resources dashboard.
innovaasWebsite/
βββ public/ # Static assets served directly by Next.js
β βββ favicon.ico # Website favicon
β βββ favicon-16x16.png # Small favicon for browsers
β βββ favicon-32x32.png # Standard favicon size
β βββ favicon-48x48.png # Larger favicon for bookmarks
β βββ apple-touch-icon.png # Icon for iOS devices
β βββ android-chrome-192x192.png # Android app icon (small)
β βββ android-chrome-512x512.png # Android app icon (large)
β βββ site.webmanifest # Web app manifest for PWA features
β βββ innovaas_logo_orange_and_white.png # Company logo
β βββ UNSRevolution.webp # Hero image for internal pages
βββ src/
β βββ app/ # Next.js App Router (all routes and pages)
β β βββ layout.tsx # Root layout (applies to all pages)
β β βββ page.tsx # Homepage (/)
β β βββ about/page.tsx # About page (/about)
β β βββ services/page.tsx # Services page (/services)
β β βββ partners/page.tsx # Partners page (/partners)
β β βββ blog/page.tsx # Blog page (/blog)
β β βββ login/page.tsx # Login page (/login)
β β βββ apply/page.tsx # Application page (/apply)
β β βββ legal/page.tsx # Legal information (/legal)
β β βββ privacy/page.tsx # Privacy policy (/privacy)
β β βββ team/page.tsx # Employee Resources Dashboard (/team)
β β βββ api/ # API routes (serverless functions)
β β βββ [route]/route.ts # Dynamic API endpoints
β βββ components/ # Reusable React components
β β βββ Header.tsx # Site header with navigation
β β βββ Hero.tsx # Hero section for pages
β β βββ ClientLayout.tsx # Layout wrapper for client pages
β β βββ LogoutButton.tsx # Authentication logout component
β β βββ ProtectedRoute.tsx # Route protection component
β βββ hooks/ # Custom React hooks
β β βββ [hook files] # Reusable state and logic
β βββ utils/ # Utility functions and configurations
β βββ supabase/ # Supabase database configuration
β βββ client.ts # Supabase client initialization
βββ middleware.ts # Next.js middleware for route protection
βββ package.json # Project dependencies and scripts
βββ package-lock.json # Locked dependency versions
βββ README.md # This documentation file
Purpose: Stores static assets that are served directly by Next.js without processing.
Why it exists:
- Performance: Static files are served directly from the server, reducing load times
- SEO: Favicons and web manifests help with search engine optimization
- User Experience: Proper icons ensure your site looks professional across all devices
Key files:
favicon.ico- The main website icon that appears in browser tabssite.webmanifest- Enables Progressive Web App (PWA) featuresinnovaas_logo_orange_and_white.png- Your company brandingUNSRevolution.webp- Hero image used on internal pages
Purpose: Contains all the routes and pages of your website using Next.js 14's App Router.
Why it exists:
- File-based routing: Each folder becomes a route automatically
- Server-side rendering: Pages are rendered on the server for better SEO
- Layout system: Shared layouts reduce code duplication
Key pages:
page.tsx- Your homepage (accessible at/)about/page.tsx- About page (accessible at/about)services/page.tsx- Services offered (accessible at/services)partners/page.tsx- Partner information (accessible at/partners)blog/page.tsx- Blog content (accessible at/blog)login/page.tsx- User authentication (accessible at/login)apply/page.tsx- Application forms (accessible at/apply)legal/page.tsx- Legal documents (accessible at/legal)privacy/page.tsx- Privacy policy (accessible at/privacy)team/page.tsx- Employee Resources Dashboard (accessible at/team)
Purpose: Internal company portal for Innovaas employees to access work tools and resources.
Why it exists:
- Centralized Access: Single point of entry for all company tools
- Resource Management: Easy access to time tracking, HR portal, IT support, etc.
- Employee Productivity: Streamlines access to daily work tools
Features:
- Time Tracking system (live at
http://3.0.115.144:8001/en) - Employee Contract documents
- SOP Directory
- HR Portal
- IT Support
- Company Calendar
- Expense Reporting
- Benefits Information
- Authentication required (logout functionality included)
Purpose: Serverless functions that handle backend logic without a separate server.
Why it exists:
- Backend functionality: Handle form submissions, data processing, external API calls
- Database operations: Connect to Supabase or other databases
- Authentication: Handle login/logout logic
- File uploads: Process file uploads and storage
Purpose: Reusable React components that can be used across multiple pages.
Why it exists:
- Code reusability: Write once, use everywhere
- Maintainability: Changes to a component update everywhere it's used
- Consistency: Ensures UI elements look and behave the same across the site
Key components:
Header.tsx- Navigation bar that appears on all pagesHero.tsx- Eye-catching section for pagesClientLayout.tsx- Wrapper for pages that need special layoutLogoutButton.tsx- Handles user logout functionalityProtectedRoute.tsx- Prevents unauthorized access to certain pages
Purpose: Custom React hooks that encapsulate reusable state and logic.
Why it exists:
- State management: Share state between components
- API calls: Centralize data fetching logic
- Authentication: Manage user login state
- Form handling: Reusable form validation and submission logic
Purpose: Helper functions and configurations that don't belong in components.
Why it exists:
- Database connections: Supabase client configuration
- Helper functions: Date formatting, data validation, etc.
- Constants: App-wide configuration values
- Type definitions: TypeScript type definitions
Key files:
supabase/client.ts- Initializes connection to Supabase database
Purpose: Runs before each request to handle authentication, redirects, and security.
Why it exists:
- Route protection: Prevent unauthorized access to certain pages
- Authentication checks: Verify user login status
- Redirects: Automatically redirect users based on their status
- Security: Add security headers and validate requests
- Node.js 18+ installed on your machine
- npm or yarn package manager
- Git for version control
-
Clone the repository (if you haven't already):
git clone https://github.com/innovaassolutions/innovaasWebsite.git cd innovaasWebsite -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile in the root directory with:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:3000
npm run dev- Start development server with hot reloadnpm run build- Build the project for productionnpm run start- Start the production servernpm run lint- Run ESLint to check code quality
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on every push to main branch
- Netlify: Connect repository and set build command to
npm run build - AWS Amplify: Connect repository and configure build settings
- DigitalOcean App Platform: Connect repository and set Node.js environment
Create a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Optional: Analytics
NEXT_PUBLIC_GA_ID=your_google_analytics_id
# Optional: Contact Form
CONTACT_EMAIL=your_contact_email- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes and test thoroughly
- Commit your changes:
git add . git commit -m "Add: description of your changes"
- Push to your branch:
git push origin feature/your-feature-name
- Create a Pull Request on GitHub
-
"Module not found" errors:
- Run
npm installto ensure all dependencies are installed - Check that file paths are correct (case-sensitive)
- Run
-
Build errors:
- Check that all environment variables are set
- Ensure all imports are correct
- Run
npm run lintto check for code issues
-
Database connection issues:
- Verify Supabase credentials in
.env.local - Check that your Supabase project is active
- Verify Supabase credentials in
- Check the Next.js documentation
- Review Supabase documentation
- Create an issue in the GitHub repository
This project is proprietary to Innovaas Solutions. All rights reserved.
For support or questions:
- Email: [[email protected]]
- GitHub Issues: Create an issue
Last Updated: December 2024 Version: 1.0.0