A modern, modular React/Next.js website for Nexlayer - the first agent-native cloud platform. This guide helps developers efficiently update, edit, and manage the website.
- Next.js 14 - React framework with App Router
- React 18 - UI library with hooks and modern features
- TypeScript - Type-safe JavaScript development
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Pre-built, accessible UI components
- Framer Motion - Animation library for smooth transitions
- Node.js 18+ - JavaScript runtime
- npm/yarn - Package managers
- ESLint - Code linting and formatting
- PostCSS - CSS processing
- Nexlayer - Platform for deployment and hosting
- GitHub - Version control and collaboration
- GitHub Assets - Image and asset hosting via GitHub releases or raw content
- Lucide React - Icon library
- clsx - Conditional CSS classes
- class-variance-authority - Component variant management
- Next.js Image - Optimized image handling
- Code Splitting - Automatic bundle optimization
- Static Generation - Fast page loads
- Responsive Design - Mobile-first approach
- GitHub Raw Content - Direct image hosting via GitHub
The website uses a modular component architecture where each section is completely independent. This means you can:
- β Edit any section without affecting others
- β Add new sections easily
- β Remove sections without breaking the site
- β Reorder sections by changing import order
nexlayer-website/
βββ app/ # Next.js 14 App Router
β βββ page.tsx # Main landing page (imports all sections)
β βββ layout.tsx # Root layout with metadata
β βββ globals.css # Global Tailwind styles
β βββ blog/ # Blog pages (if needed)
βββ components/
β βββ layout/ # Layout components
β β βββ Navigation.tsx # Top navigation bar
β β βββ Footer.tsx # Site footer
β βββ sections/ # Main page sections (MODULAR)
β β βββ HeroSection.tsx # Hero with CTA
β β βββ ComparisonSection.tsx # Without vs With comparison
β β βββ FeaturesSection.tsx # Features grid
β β βββ FeaturesGridSection.tsx # Production features
β β βββ HowItWorksSection.tsx # Interactive step-by-step
β β βββ TestimonialsSection.tsx # Customer testimonials
β β βββ index.ts # Section exports
β βββ shared/ # Reusable components
β β βββ TypingEffect.tsx # Animated typing
β β βββ ShaderBackground.tsx # Animated background
β β βββ AgenticCloudOrb.tsx # Cloud orb animation
β βββ ui/ # shadcn/ui components
β β βββ button.tsx # Button component
β β βββ card.tsx # Card component
β β βββ ... # Other UI components
β βββ logos/ # Company logos
βββ public/ # Static assets
β βββ images/ # Images and avatars
β βββ icons/ # SVG icons
βββ lib/ # Utilities
β βββ utils.ts # Helper functions
βββ hooks/ # Custom React hooks
βββ tailwind.config.js # Tailwind configuration
βββ next.config.mjs # Next.js configuration
βββ package.json # Dependencies
- HeroSection - Main headline, CTA, social proof
- ComparisonSection - "Without vs With" visual comparison
- FeaturesSection - Feature comparison grid
- FeaturesGridSection - Production-ready features
- HowItWorksSection - Interactive 4-step process
- TestimonialsSection - Customer testimonials
- Footer - Site footer with links
Example: Update HeroSection text
// components/sections/HeroSection.tsx
export const HeroSection = () => {
return (
<section className="...">
<h1 className="text-6xl font-bold">
{/* Change this text - no other files affected */}
Your new headline here
</h1>
</section>
)
}- Create the component:
// components/sections/NewSection.tsx
"use client"
export const NewSection = () => {
return (
<section className="py-20 bg-black">
<div className="max-w-7xl mx-auto px-4">
<h2 className="text-4xl font-bold text-white">New Section</h2>
{/* Your content */}
</div>
</section>
)
}- Export it:
// components/sections/index.ts
export { NewSection } from './NewSection'- Add to main page:
// app/page.tsx
import { NewSection } from '@/components/sections'
export default function Home() {
return (
<main>
<HeroSection />
<ComparisonSection />
<NewSection /> {/* Add here */}
<FeaturesSection />
{/* ... other sections */}
</main>
)
}Simply delete the import and component call from app/page.tsx. The section file can remain for future use.
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build- Edit Content: Modify text, images, links in section components
- Update Styling: Use Tailwind classes in component JSX
- Add Features: Create new components in appropriate folders
- Test: Check responsiveness and functionality
- Commit: Use conventional commit messages
Change a button link:
// In any section component
<Button onClick={() => window.open('https://new-link.com')}>
Updated Button Text
</Button>Update colors:
// Use Tailwind classes or update tailwind.config.js
<div className="bg-cyan-400 text-black"> // Primary brand color
<div className="bg-blue-500 text-white"> // Secondary colorAdd animations:
// Use Tailwind animation classes
<div className="animate-pulse">Pulsing effect</div>
<div className="hover:scale-105 transition-transform">Hover effect</div>- Primary:
bg-cyan-400,text-cyan-400(#28B8CD) - Secondary:
bg-blue-500,text-blue-500(#3B82F6) - Background:
bg-black,bg-[#0a0a0a] - Text:
text-white,text-gray-400
- Headings:
text-4xl font-bold,text-2xl font-semibold - Body:
text-lg,text-base - Small:
text-sm
- Sections:
py-20(vertical padding) - Containers:
max-w-7xl mx-auto px-4 - Elements:
mb-6,mt-8,gap-4
- Buttons: Use
Buttonfromcomponents/ui/button - Cards: Use
Cardfromcomponents/ui/card - Layout: Use
Containerpattern withmax-w-7xl mx-auto
// Add custom colors, fonts, animations
module.exports = {
theme: {
extend: {
colors: {
'brand': '#28B8CD',
}
}
}
}// Configure images, redirects, headers
const nextConfig = {
images: {
domains: ['raw.githubusercontent.com', 'github.com']
}
}// UI component configuration
{
"style": "default",
"tailwind": {
"config": "tailwind.config.js"
}
}- Mobile:
< 768px(default) - Tablet:
md:(768px+) - Desktop:
lg:(1024px+) - Large:
xl:(1280px+)
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
{/* Responsive grid */}
</div>- Use Next.js
Imagecomponent for optimization - Host images via GitHub raw content or releases
- Use appropriate formats (WebP, AVIF)
- Nexlayer platform handles image optimization and CDN delivery
- Each section is automatically code-split
- Lazy load non-critical components if needed
- Import only needed components
- Use dynamic imports for heavy libraries
Build Errors:
# Clear Next.js cache
rm -rf .next
npm run buildStyling Issues:
# Rebuild Tailwind
npm run build:cssImport Errors:
- Check file paths are correct
- Ensure components are exported from index files
- Verify TypeScript types
# Run with debug logging
DEBUG=* npm run dev- β Keep components small and focused
- β Use TypeScript for all components
- β Follow consistent naming conventions
- β Add comments for complex logic
- β Optimize images and videos
- β Use proper semantic HTML
- β Implement accessibility features
- β Test on multiple devices
- β Update dependencies regularly
- β Monitor bundle size
- β Test after major changes
- β Document new features
- Create a branch:
git checkout -b feature/new-section - Make changes: Follow established patterns
- Test thoroughly: Check all breakpoints
- Commit: Use conventional commits
- Submit PR: Include description of changes
feat: add new testimonials section
fix: update hero CTA link
style: adjust comparison section spacing
docs: update README with new section
For questions about:
- Code structure: Check this README
- Design system: Review existing components
- Deployment: Check Nexlayer platform documentation
- Issues: Create GitHub issue with details
Built with: Next.js 14, React 18, TypeScript, Tailwind CSS
Last Updated: January 2026