Skip to content

Nexlayer/website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

156 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nexlayer Website - Developer Guide

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.

πŸ› οΈ Technology Stack

Frontend Framework

  • Next.js 14 - React framework with App Router
  • React 18 - UI library with hooks and modern features
  • TypeScript - Type-safe JavaScript development

Styling & UI

  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - Pre-built, accessible UI components
  • Framer Motion - Animation library for smooth transitions

Development Tools

  • Node.js 18+ - JavaScript runtime
  • npm/yarn - Package managers
  • ESLint - Code linting and formatting
  • PostCSS - CSS processing

Deployment & Hosting

  • Nexlayer - Platform for deployment and hosting
  • GitHub - Version control and collaboration
  • GitHub Assets - Image and asset hosting via GitHub releases or raw content

Key Libraries

  • Lucide React - Icon library
  • clsx - Conditional CSS classes
  • class-variance-authority - Component variant management

Performance & Optimization

  • 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

πŸ—οΈ Architecture Overview

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

πŸ“ Project Structure

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

🎯 Section Management

Current Sections (in order of appearance):

  1. HeroSection - Main headline, CTA, social proof
  2. ComparisonSection - "Without vs With" visual comparison
  3. FeaturesSection - Feature comparison grid
  4. FeaturesGridSection - Production-ready features
  5. HowItWorksSection - Interactive 4-step process
  6. TestimonialsSection - Customer testimonials
  7. Footer - Site footer with links

How to Edit a Section:

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>
  )
}

How to Add a New Section:

  1. 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>
  )
}
  1. Export it:
// components/sections/index.ts
export { NewSection } from './NewSection'
  1. 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>
  )
}

How to Remove a Section:

Simply delete the import and component call from app/page.tsx. The section file can remain for future use.

πŸ› οΈ Development Workflow

Quick Start:

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Making Changes:

  1. Edit Content: Modify text, images, links in section components
  2. Update Styling: Use Tailwind classes in component JSX
  3. Add Features: Create new components in appropriate folders
  4. Test: Check responsiveness and functionality
  5. Commit: Use conventional commit messages

Common Tasks:

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 color

Add animations:

// Use Tailwind animation classes
<div className="animate-pulse">Pulsing effect</div>
<div className="hover:scale-105 transition-transform">Hover effect</div>

🎨 Design System

Colors (Tailwind Classes):

  • 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

Typography:

  • Headings: text-4xl font-bold, text-2xl font-semibold
  • Body: text-lg, text-base
  • Small: text-sm

Spacing:

  • Sections: py-20 (vertical padding)
  • Containers: max-w-7xl mx-auto px-4
  • Elements: mb-6, mt-8, gap-4

Components:

  • Buttons: Use Button from components/ui/button
  • Cards: Use Card from components/ui/card
  • Layout: Use Container pattern with max-w-7xl mx-auto

πŸ”§ Configuration Files

tailwind.config.js - Styling

// Add custom colors, fonts, animations
module.exports = {
  theme: {
    extend: {
      colors: {
        'brand': '#28B8CD',
      }
    }
  }
}

next.config.mjs - Next.js Settings

// Configure images, redirects, headers
const nextConfig = {
  images: {
    domains: ['raw.githubusercontent.com', 'github.com']
  }
}

components.json - shadcn/ui Config

// UI component configuration
{
  "style": "default",
  "tailwind": {
    "config": "tailwind.config.js"
  }
}

πŸ“± Responsive Design

Breakpoints:

  • Mobile: < 768px (default)
  • Tablet: md: (768px+)
  • Desktop: lg: (1024px+)
  • Large: xl: (1280px+)

Example:

<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
  {/* Responsive grid */}
</div>

πŸš€ Performance Tips

Images:

  • Use Next.js Image component for optimization
  • Host images via GitHub raw content or releases
  • Use appropriate formats (WebP, AVIF)
  • Nexlayer platform handles image optimization and CDN delivery

Code Splitting:

  • Each section is automatically code-split
  • Lazy load non-critical components if needed

Bundle Size:

  • Import only needed components
  • Use dynamic imports for heavy libraries

πŸ› Troubleshooting

Common Issues:

Build Errors:

# Clear Next.js cache
rm -rf .next
npm run build

Styling Issues:

# Rebuild Tailwind
npm run build:css

Import Errors:

  • Check file paths are correct
  • Ensure components are exported from index files
  • Verify TypeScript types

Debug Mode:

# Run with debug logging
DEBUG=* npm run dev

πŸ“ Best Practices

Code Organization:

  • βœ… Keep components small and focused
  • βœ… Use TypeScript for all components
  • βœ… Follow consistent naming conventions
  • βœ… Add comments for complex logic

Performance:

  • βœ… Optimize images and videos
  • βœ… Use proper semantic HTML
  • βœ… Implement accessibility features
  • βœ… Test on multiple devices

Maintenance:

  • βœ… Update dependencies regularly
  • βœ… Monitor bundle size
  • βœ… Test after major changes
  • βœ… Document new features

🀝 Contributing

  1. Create a branch: git checkout -b feature/new-section
  2. Make changes: Follow established patterns
  3. Test thoroughly: Check all breakpoints
  4. Commit: Use conventional commits
  5. Submit PR: Include description of changes

Commit Convention:

feat: add new testimonials section
fix: update hero CTA link
style: adjust comparison section spacing
docs: update README with new section

πŸ“ž Support

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

About

Nexlayer main website on nexlayer.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages