v3.2.0
Last updated: January 15, 2025 ยท v3.2.0

WebCraft Studios Documentation

A comprehensive guide to building, deploying, and maintaining premium business and corporate websites with WebCraft Studios' development framework and services.

โ„น๏ธ
Welcome to WebCraft Docs

This documentation covers everything from initial project setup to advanced deployment strategies. If you're new to WebCraft, we recommend starting with the Quick Start guide.

Overview

WebCraft Studios is a premium web development agency specializing in business and corporate website solutions. Our framework and methodology is built on three core pillars:

Technology Stack

Our development stack is carefully curated for performance, reliability, and developer experience:

d>
Category Technology Purpose Version
Framework Next.js Full-stack React framework 14.x
Styling Tailwind CSS Utility-first CSS framework 3.4.x
Type Safety TypeScript Static type checking 5.3.x
CMS Sanity / Strapi Headless content management Latest
Hosting Vercel / AWS Global CDN & edge deployment โ€”
Analytics Plausible / GA4 Privacy-first analytics โ€”
CI/CD GitHub Actions Automated testing & deployment โ€”

Quick Start

Follow these steps to set up a new WebCraft project from scratch. This guide assumes you have Node.js 18+ and npm installed.

1

Install the WebCraft CLI

Install the official WebCraft command-line interface globally on your system:

bash
# Using npm
npm install -g @webcraft/cli

# Using yarn
yarn global add @webcraft/cli

# Using pnpm
pnpm add -g @webcraft/cli
2

Create a New Project

Initialize a new project with the WebCraft corporate site template:

bash
# Create a new project with the corporate template
webcraft create my-company-site --template corporate

# Or use the landing page template
webcraft create my-landing-page --template landing-page

# Or start with a blank scaffold
webcraft create my-project --template blank
3

Configure Environment Variables

Copy the example environment file and configure your settings:

bash
# Navigate into your project
cd my-company-site

# Copy the example env file
cp .env.example .env.local

# Install dependencies
npm install
4

Start the Development Server

Launch the local development server with hot-reloading enabled:

bash
npm run dev

# Output:
# โœ“ WebCraft development server running
# โ†’ Local:   http://localhost:3000
# โ†’ Network: http://192.168.1.5:3000
โœ…
That's it!

Open http://localhost:3000 in your browser. You should see the WebCraft starter template. Start editing by modifying files in the /app directory.

Project Structure

A WebCraft project follows a conventional directory structure that promotes consistency and maintainability:

text
my-company-site/
โ”œโ”€โ”€ /app                  # Next.js App Router pages
โ”‚   โ”œโ”€โ”€ /api              # API routes
โ”‚   โ”œโ”€โ”€ /(routes)         # Page route groups
โ”‚   โ”‚   โ”œโ”€โ”€ /about
โ”‚   โ”‚   โ”œโ”€โ”€ /services
โ”‚   โ”‚   โ””โ”€โ”€ /contact
โ”‚   โ”œโ”€โ”€ layout.tsx        # Root layout
โ”‚   โ”œโ”€โ”€ page.tsx          # Homepage
โ”‚   โ””โ”€โ”€ globals.css       # Global styles
โ”œโ”€โ”€ /components           # Reusable UI components
โ”‚   โ”œโ”€โ”€ /ui               # Base UI primitives
โ”‚   โ”œโ”€โ”€ /layout           # Layout components
โ”‚   โ””โ”€โ”€ /sections         # Page sections
โ”œโ”€โ”€ /lib                  # Shared utilities
โ”œโ”€โ”€ /styles               # Tailwind config & themes
โ”œโ”€โ”€ /public               # Static assets
โ”œโ”€โ”€ /types                # TypeScript definitions
โ”œโ”€โ”€ /tests                # Test files
โ”œโ”€โ”€ next.config.js        # Next.js configuration
โ”œโ”€โ”€ tailwind.config.js    # Tailwind configuration
โ”œโ”€โ”€ tsconfig.json         # TypeScript configuration
โ””โ”€โ”€ package.json          # Project metadata

Configuration

WebCraft projects are configured through a combination of environment variables and a webcraft.config.js file.

Environment Variables

Create a .env.local file in your project root with the following variables:

Variable Type Default Description
NEXT_PUBLIC_SITE_NAME string "WebCraft Site" Display name for the website
NEXT_PUBLIC_SITE_URL string "http://localhost:3000" Base URL of the site
NEXT_PUBLIC_ANALYTICS_ID string "" Analytics tracking ID
ENABLE_CMS boolean false Enable headless CMS integration
ENABLE_SSG boolean true Static site generation mode
IMAGE_CDN_URL string "" CDN URL for image optimization
MAX_IMAGE_WIDTH number 1920 Maximum image width for optimization

WebCraft Config File

The webcraft.config.js file controls project-specific settings:

javascript
export default {
  // Site metadata
  site: {
    name: "Acme Corporation",
    description: "Leading provider of innovative business solutions",
    url: "https://acme-corp.example.com",
    favicon: "/favicon.ico",
  },

  // Theme configuration
  theme: {
    primaryColor: "#2563eb",
    secondaryColor: "#06b6d4",
    fontFamily: "Inter",
    borderRadius: "12px",
  },

  // Navigation structure
  navigation: {
    header: [
      { label: "Home", href: "/" },
      { label: "Services", href: "/services" },
      { label: "About", href: "/about" },
      { label: "Contact", href: "/contact", cta: true },
    ],
    footer: [
      {
        title: "Services",
        links: [
          { label: "Web Design", href: "/services/web-design" },
          { label: "Development", href: "/services/development" },
        ],
      },
    ],
  },

  // SEO settings
  seo: {
    enableSitemap: true,
    enableRobots: true,
    enableSchema: true,
    openGraph: {
      type: "website",
      locale: "en_US",
    },
  },

  // Performance
  performance: {
    enableImageOptimization: true,
    enableLazyLoading: true,
    enablePreloading: true,
    prefetchLinks: true,
  },
};

Services Documentation

WebCraft Studios offers a range of professional web development services. Below is an overview of each service tier and what's included.

Web Development

Our core web development service encompasses the full lifecycle of website creation, from initial concept through deployment and ongoing maintenance.

โ„น๏ธ
Service Overview

All Web Development projects include responsive design, cross-browser compatibility, SEO fundamentals, and a 30-day post-launch support period.

Deliverables

Timeline

Phase Duration Milestones
Discovery & Strategy 1โ€“2 weeks Requirements doc, sitemap, wireframes
Design 2โ€“3 weeks UI mockups, design system, prototypes
Development 3โ€“5 weeks Frontend, backend, CMS integration
Testing & QA 1 week Cross-browser, performance, accessibility
Launch & Handoff 3โ€“5 days Deployment, DNS, documentation

Landing Pages

High-converting landing pages built with psychological triggers, A/B tested layouts, and compelling call-to-action strategies.

โš ๏ธ
Important

Landing pages are single-purpose pages optimized for conversion. They should not be confused with multi-page websites. Each landing page focuses on a single offer or action.

Key Features

Corporate Websites

Professional multi-page websites designed for established businesses that need a comprehensive online presence with content management capabilities.

Page Templates

Corporate websites typically include the following page templates:

  • Homepage โ€” Brand overview, value proposition, key services, social proof
  • About Us โ€” Company history, mission, vision, values, leadership team
  • Services โ€” Detailed service descriptions with case studies
  • Contact โ€” Contact forms, office locations, interactive map
  • Blog / News โ€” Content marketing hub with categories and search
  • Careers โ€” Job listings, company culture, benefits overview
  • Case Studies โ€” Detailed project portfolios with metrics
  • Partners โ€” Technology partners and integrations
  • Resources โ€” Whitepapers, guides, and downloadable content
  • FAQ โ€” Searchable frequently asked questions

API Reference

WebCraft provides a RESTful API for content management and dynamic content delivery. All API endpoints return JSON responses.

Base URL

text
https://api.webcraft.studio/v3

Authentication

All API requests require authentication via Bearer token in the Authorization header:

http
GET /api/v3/pages HTTP/1.1
Host: api.webcraft.studio
Authorization: Bearer your_api_token_here
Content-Type: application/json

Endpoints

Method Endpoint Description
GET /pages List all pages
GET /pages/:slug Get page by slug
POST /pages Create new page
PUT /pages/:slug Update page content
DELETE /pages/:slug Delete a page
GET /components List available components
GET /analytics Get analytics data
POST /deploy Trigger deployment

Response Format

All API responses follow a consistent format:

json
{
  "success": true,
  "data": {
    "id": "pg_abc123",
    "slug": "about-us",
    "title": "About Us",
    "status": "published",
    "createdAt": "2025-01-15T10:30:00Z",
    "updatedAt": "2025-01-20T14:45:00Z"
  },
  "meta": {
    "requestId": "req_xyz789",
    "timestamp": "2025-01-20T15:00:00Z"
  }
}

Error Handling

Errors are returned with appropriate HTTP status codes and a standardized error object:

json
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Page with slug 'nonexistent' was not found",
    "details": {
      "resource": "page",
      "slug": "nonexistent"
    }
  }
}
๐Ÿšจ
Rate Limiting

API requests are limited to 1000 requests per hour per token. Exceeding this limit returns a 429 Too Many Requests response. Implement exponential backoff in your integration.

Frequently Asked Questions

General

What is the typical project timeline?

Most corporate website projects take 8โ€“12 weeks from kickoff to launch. Landing pages can be delivered in 2โ€“3 weeks. Enterprise projects with complex requirements may take 16+ weeks.

Do you offer ongoing maintenance?

Yes. All projects include a 30-day post-launch support period. Extended maintenance plans are available starting at $499/month, which includes security updates, content updates, and performance monitoring.

Can I update content myself?

Absolutely. All our corporate and enterprise websites include a user-friendly CMS dashboard. We provide training sessions and documentation to help your team manage content independently.

Technical

What hosting options are available?

We primarily deploy on Vercel for Next.js projects and AWS for custom applications. We also support Netlify, Cloudflare Pages, and custom server deployments.

Is my website secure?

Security is a core part of our process. All sites include SSL/TLS encryption, CSP headers, input validation, SQL injection prevention, and regular security audits.

Do you provide source code?

Yes. You own your website and its source code. We deliver the complete repository with documentation, deployment scripts, and a handoff guide.

Troubleshooting

Issue Cause Solution
Build fails with ENOENT Missing environment variables Ensure .env.local exists with required variables
Styles not applying Tailwind not scanning files Check tailwind.config.js content paths include all component directories
Images not loading Missing domain in next.config.js Add image domain to images.domains array in config
API returning 401 Invalid or expired token Regenerate API token from the WebCraft dashboard
Slow page loads Large images or unused bundles Enable image optimization and code splitting in config
CMS connection fails Incorrect API credentials Verify CMS project ID and API key in environment variables
๐Ÿ’ก
Still having issues?

Check our GitHub Discussions for community support or contact our support team for direct assistance.

Changelog

v3.2.0 โ€” January 15, 2025

v3.1.0 โ€” December 1, 2024

v3.0.0 โ€” October 15, 2024