Skip to content

Wilfredery/std-official

Repository files navigation

ShineTechData Official Website

Next.js React TypeScript Tailwind CSS Tests License

Live Site: shinetechdata.com (Vercel)

The official website for ShineTechData — a data consulting company specializing in business intelligence, data analysis, and machine learning solutions. Built with modern web technologies, optimized for performance, and accessible to all users.

Bilingual: English & Spanish with automatic locale detection.

Quick Preview

Site Preview

Performance: 92/100(Mobile) 99/100(desktop) on Google PageSpeed Insights .


Tech Stack

Technology Version Purpose
Next.js 16.2 App Router, SSR, SSG, Turbopack
React 19.2 UI framework
TypeScript 5 Type safety
Tailwind CSS 4 Utility-first styling
Base UI 1.5 Accessible primitives
next-intl 4.12 Internationalization
Vitest 4.1 Test runner
React Testing Library 16.3 Component testing
Lucide React 1.16 Icon library
web-vitals 5.3 Core Web Vitals monitoring

Package Manager: pnpm

Fonts: Libre Franklin (Google Fonts)


Features

Core

  • Bilingual (EN/ES) — Locale-prefixed routing with automatic language detection
  • Dark/Light Theme — System-aware with manual toggle and keyboard shortcut ("D"). Anti-flash script runs before hydration to prevent theme flicker on reload.
  • Fully Responsive — Mobile-first design across all breakpoints
  • Accessible — Semantic HTML, focus-visible, screen-reader support, WCAG-compliant

Content

  • Animated Hero — Typing-effect headline with smooth transitions
  • Scroll Animations — Content reveals on scroll via IntersectionObserver
  • Service Detail Pages — 6 services × 2 locales, statically generated at build time
  • About Page — Company story, mission, vision, and values
  • Contact Page — Inquiry section with FAQ accordion
  • Legal Pages — Terms of Service and Privacy Policy
  • Custom 404 — Locale-aware not-found page

Performance & SEO

  • Server Components — Reduced client-side JavaScript with React Server Components
  • Lazy Loading — Interactive components loaded on-demand with next/dynamic
  • Font Preloading — Google Fonts preloaded via next/font
  • Core Web Vitals Monitoring — Real-user metrics via web-vitals library
  • Structured Data — JSON-LD for Organization, WebSite, Services, Breadcrumbs
  • SEO Optimized — Dynamic metadata, Open Graph, Twitter Cards, canonical URLs

Pages

Route Description
/ Home — hero, problem statement, services overview, process, CTA
/services Service listing with card grid and slider
/services/[slug] Individual service detail page (6 services)
/about Company story, mission, vision, and values
/contact Contact form and FAQ
/terms Terms of Service
/privacy Privacy Policy

Getting Started

Prerequisites

  • Node.js ≥ 20
  • pnpm (recommended package manager)

Install & Run

# Clone the repository
git clone https://github.com/Wilfredery/std-official.git
cd std-official

# Install dependencies
pnpm install

# Start the development server
pnpm dev

Open http://localhost:3000 in your browser.


Development Commands

Command Description
pnpm dev Start development server with Turbopack
pnpm build Build for production
pnpm test Run tests in watch mode
pnpm test:run Run all tests once (CI-friendly)
pnpm lint Lint with ESLint

Project Structure

std-official/
├── app/                    # Next.js App Router
│   ├── [locale]/           # Locale-scoped routes (en, es)
│   │   ├── about/          # About page
│   │   ├── contact/        # Contact page
│   │   ├── services/       # Services listing + [slug] detail
│   │   ├── terms/          # Terms of Service
│   │   └── privacy/        # Privacy Policy
│   ├── layout.tsx          # Root layout (fonts, metadata, providers)
│   └── globals.css         # Global styles & Tailwind config
├── components/             # Reusable UI components
│   ├── home/               # Home page sections
│   ├── services/           # Service components
│   ├── contact/            # Contact form & FAQ
│   ├── layout/             # Header, footer, nav
│   ├── seo/                # SEO & JSON-LD components
│   ├── web-vitals/         # Web vitals script injection
│   ├── errors/             # Error suppression components
│   └── ui/                 # UI primitives (shadcn/ui)
├── lib/                    # Business logic & utilities
│   ├── data/               # Static data & service definitions
│   └── i18n/               # next-intl configuration
├── messages/               # Translation files
│   ├── en.json             # English
│   └── es.json             # Spanish
├── public/                 # Static assets
│   └── theme-anti-flash.js # Pre-hydration theme script
└── __tests__/              # Colocated tests

Theme System Architecture

The custom theme system replaces next-themes with a lightweight Context-based solution:

  • Anti-Flash Script: public/theme-anti-flash.js runs synchronously before React hydration to apply the correct theme class based on localStorage preference
  • Context Provider: lib/theme/ThemeContext.tsx manages state, localStorage persistence, and matchMedia subscription for system theme changes
  • Error Suppression: components/errors/SuppressScriptError.tsx filters the React 19 false-positive warning about <script> in Server Components (Next.js 16 + Turbopack)
  • Web Vitals: components/web-vitals/WebVitalsScript.tsx injects the web-vitals library on first user interaction or 5-second idle timeout

Internationalization

Translations live in messages/ as JSON files organized by page section.

Adding a new string:

  1. Add the key to both en.json and es.json
  2. Use getTranslations("namespace") in Server Components
  3. Use useTranslations("namespace") in Client Components

The locale is detected from the URL prefix (/en, /es). The root path (/) redirects to the preferred locale.


Testing

555 tests across 76 test files — all passing.

  • Framework: Vitest with jsdom environment
  • Library: React Testing Library + jest-dom matchers
  • Coverage: 100% of components tested, plus metadata and SEO tests

Tests are colocated with source files inside __tests__/ directories. Each component has tests covering rendering, interactions, accessibility, and both locales.


Performance

  • PageSpeed Insights: 92/100 (Mobile)
  • Architecture: Server Components + lazy-loaded interactive islands
  • Font Optimization: Preloaded via next/font
  • Asset Optimization: Static assets with optimal cache headers
  • Core Web Vitals: Monitored in production via web-vitals

PageSpeed Insights

PageSpeed Mobile — 92/100 PageSpeed Desktop

Left: Mobile score • Right: Desktop score


Deployment

Deployed on Vercel with Next.js native SSR support.

Environment

  • Platform: Vercel (Serverless)
  • Build Command: next build
  • Output Directory: .next (default)

Deploying

# Build locally to verify
pnpm build

# Start production server locally
pnpm start

Vercel Dashboard:

  1. Import repository from GitHub
  2. Framework preset: Next.js
  3. Build command: next build
  4. Output directory: leave empty (default .next)

Each push to master triggers automatic deployment.


Contributing

  1. Run pnpm test:run — all 555 tests must pass
  2. If your change affects UI, add or update tests
  3. If your change adds user-facing text, update both en.json and es.json
  4. Follow existing project structure and TypeScript conventions
  5. Keep commits small and focused

License

MIT © ShineTechData

About

Official website for ShineTechData — Next.js 16, React 19, bilingual (EN/ES),

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors