Skip to content

About

Um site institucional inspirado na Volkswagen Brasil. - A corporate website inspired by Volkswagen Brazil.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VW WEBSITE - ᴇɴ

Corporate website, landing page, and vehicle configurator for Volkswagen Brazil, developed using Next.js 16, Prisma, TailwindCSS v4, and custom authentication with secure sessions. This is an independent project developed by a brand enthusiast for study, experimentation, and portfolio purposes. It has no official affiliation with Volkswagen.

Overview

The VW Website was created with the goal of recreating and expanding upon the experience found on the official Volkswagen Brazil portal, utilizing modern technologies from the JavaScript ecosystem to build a robust, scalable, full-stack application that mirrors a corporate environment.

Beyond merely reproducing the interface, the project seeks to simulate real-world workflows used by major automotive companies—ranging from vehicle browsing and authentication to user management, lead generation, and custom vehicle configuration.

In addition to serving as a technical challenge, the project is a tribute to Volkswagen, demonstrating how a modern digital experience can be built using current web development tools.

A full-stack web application replicating the official site's experience. The project covers:

  • Model showcase with filters for fuel type and transmission
  • Vehicle configurator (colors, wheels, seats, technology features)
  • Dealership locator with an interactive map via Google Maps
  • Simulation system (for customers and staff)
  • Complete authentication system (registration, login, logout, password recovery)
  • Staff/admin dashboard with statistics and user/lead management
  • Full RESTful API with validation, rate limiting, and role-based access control
  • Multi-language support (Brazilian Portuguese and US English)

Tech Stack

Category Technology
Framework Next.js 16 (App Router)
Language TypeScript 5
Styling TailwindCSS v4
ORM Prisma 6
Database PostgreSQL
Authentication Custom sessions via HTTP-only cookies
Validation Zod 4
Password Hashing bcryptjs
Maps @react-google-maps/api
Env Validation @t3-oss/env-nextjs
Fonts VWHead (custom OTF) + Geologica (Google Fonts)
Animations Framer Motion 12

Objectives

  • Consolidate knowledge of modern full-stack development using Next.js, Prisma, and TypeScript
  • Build a realistic application resembling an enterprise-grade product, simulating industry standards
  • Develop a comprehensive, secure authentication system with role-based access control
  • Implement a robust API featuring validation, error handling, and rate limiting
  • Work with internationalization (i18n) in a real-world application
  • Explore external integrations, such as Google Maps, in practical scenarios
  • Simulate real business workflows, such as vehicle configuration and lead generation
  • Strengthen my portfolio with a high-level project that demonstrates technical proficiency and attention to detail
  • Increase professional visibility and create an opportunity to be noticed by companies like Volkswagen

Getting Started

Requirements: Node.js 20.9+ (22 recommended) and PostgreSQL.

git clone https://github.com/caiothedev/vw-website.git
cd vw-website
npm install
cp .env.example .env   # fill in the variables (see below)
npm run db:migrate     # apply migrations
npm run db:seed        # seed cars, dealers, offers and users
npm run dev            # http://localhost:3000

Seeded users (development only): admin@vwwebsite.dev / Admin1234, staff@vwwebsite.dev / Staff1234, cliente@vwwebsite.dev / Cliente1234.

Security and Authorization

The proxy (src/proxy.ts, formerly middleware) only performs a pre-check: it requires the session cookie on /home, /staff, /api/me, /api/configurations and /api/staff/*. The actual session and role checks run on the server, through requireAuth and requireRole in API routes and the /home and /staff layouts. Every state-changing request (POST, PUT, PATCH, DELETE) to /api needs the x-csrf-token header. On the client, use the api helper from src/_lib/utils/apiClient.ts, which sends the token automatically.

CI

The .github/workflows/ci.yml workflow runs lint, typecheck and tests on every push to main and on every pull request.

Tests

Unit tests using Vitest + Testing Library, located in src/__tests__/:

npm run test            # runs the entire suite
npm run test:coverage   # with coverage

Current coverage: API response helpers, authentication utilities, validation schemas (Zod) for cars and auth, suspicious activity detection, and the rate limiting system (limits, tiered blocking, and headers).

by caiothedev
#volkswagen #nextjs #typescript #prisma #website

About

Um site institucional inspirado na Volkswagen Brasil. - A corporate website inspired by Volkswagen Brazil.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages