A modern, responsive website for professional dog care services built with Next.js 14, TypeScript, and Tailwind CSS.
- Modern Design: Clean, professional interface with smooth animations
- Responsive Layout: Optimized for all devices (mobile, tablet, desktop)
- Multi-language Support: Portuguese and English localization
- Accessibility: WCAG 2.1 compliant with ARIA labels and semantic HTML
- Performance: Optimized with Next.js 14 App Router and image optimization
- SEO Ready: Meta tags, structured data, and sitemap generation
- Testing: Comprehensive test suite with Jest and React Testing Library
- CI/CD: Automated testing and deployment with GitHub Actions
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS + SASS with BEM methodology
- UI Components: Radix UI + Custom components
- Icons: Lucide React
- Testing: Jest + React Testing Library
- Deployment: Vercel + GitHub Pages
- Internationalization: next-intl
dogwarts-website/
βββ app/ # Next.js App Router pages
β βββ contactos/ # Contact page
β βββ servicos/ # Services page
β βββ sobre/ # About page
β βββ testemunhos/ # Testimonials page
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ components/ # Reusable components
β βββ ui/ # Base UI components
β βββ navbar.tsx # Navigation component
β βββ theme-provider.tsx # Theme context
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ public/ # Static assets
βββ styles/ # SASS stylesheets
βββ __tests__/ # Test files
βββ .github/ # GitHub workflows
βββ locales/ # Translation files
- Node.js 18+
- pnpm (recommended) or npm/yarn
-
Clone the repository
git clone https://github.com/danielafgsilva/dogwarts-website.git cd dogwarts-website -
Install dependencies
pnpm install
-
Configure environment variables
cp .env.example .env # fill in your Sanity + Google Places values -
Seed the CMS (first run only)
All page content lives in Sanity β the pages render nothing for sections that have not been authored. Populate the dataset with the canonical content (requires
SANITY_API_TOKENwith write access):node scripts/seed-sanity.js
After seeding, edit everything at
/studio. -
Start development server
pnpm dev
-
Open in browser Navigate to http://localhost:3000
- All content comes from Sanity. Page copy, prices, contact details and
business hours are edited in the Studio (
/studio); there are no hardcoded text fallbacks in the pages. - Testimonials are live Google reviews. With
GOOGLE_PLACES_API_KEYand a Place ID set (env varGOOGLE_PLACE_IDorsiteSettings.contact.googlePlaceIdin Sanity), the site fetches reviews via the Places API (New), cached hourly. Without them, the reviews section links out to the Google profile instead. - Contact form opens the visitor's mail client (
mailto:) targeting the email insiteSettings. To send server-side instead, pass anonSubmithandler to<ContactForm>wired to a provider (e.g. Resend / Nodemailer).
# Development
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm type-check # Run TypeScript type checking
# Testing
pnpm test # Run tests
pnpm test:watch # Run tests in watch mode
pnpm test:coverage # Run tests with coverage report
# Styling
pnpm sass:build # Compile SASS to CSS
pnpm sass:watch # Watch SASS files for changesThe project includes comprehensive testing with Jest and React Testing Library:
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Generate coverage report
pnpm test:coverage- Components: All UI components are tested
- Pages: All pages have basic rendering tests
- Hooks: Custom hooks are tested
- Utilities: Utility functions are tested
The website supports multiple languages:
- Portuguese (pt-PT): Default language
- English (en): Secondary language
Language switching is available in the navigation menu.
We use BEM (Block Element Modifier) for CSS class naming:
// Block
.navbar {
}
// Element
.navbar__item {
}
.navbar__link {
}
// Modifier
.navbar__item--active {
}
.navbar--mobile {
}styles/
βββ abstracts/ # Variables, mixins, functions
βββ base/ # Reset, typography, base styles
βββ components/ # Component-specific styles
βββ layout/ # Layout-related styles
βββ pages/ # Page-specific styles
βββ main.scss # Main SASS file
The website follows WCAG 2.1 guidelines:
- Semantic HTML: Proper heading hierarchy and landmarks
- ARIA Labels: Screen reader support
- Keyboard Navigation: Full keyboard accessibility
- Color Contrast: WCAG AA compliant color ratios
- Focus Management: Visible focus indicators
- Connect your GitHub repository to Vercel
- Configure environment variables if needed
- Deploy automatically on every push to main
The project is configured for GitHub Pages deployment:
- Push to main branch
- GitHub Actions will automatically build and deploy
- Site will be available at
https://danielafgsilva.github.io/dogwarts-website
GitHub Actions automatically:
- Runs tests on every push and PR
- Checks code quality with ESLint and TypeScript
- Builds the project to ensure it compiles
- Deploys to GitHub Pages when merging to main
The website is fully responsive with breakpoints:
- Mobile: 320px - 767px
- Tablet: 768px - 1023px
- Desktop: 1024px+
- Lighthouse Score: 95+ across all metrics
- Core Web Vitals: Optimized for LCP, FID, and CLS
- Image Optimization: Next.js Image component with WebP support
- Code Splitting: Automatic code splitting with Next.js
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Work on
devbranch for new features - Create feature branches for specific tasks
- Write tests for new functionality
- Ensure all tests pass before submitting PR
- Code review required before merging to main
This project is licensed under the MIT License - see the LICENSE file for details.
- Daniela Silva - Lead Developer
- Dogwarts Team - Content and Design
- Website: dogwarts-website.vercel.app
- Email: contact@dogwarts.com
- GitHub: @danielafgsilva
- Next.js for the amazing React framework
- Tailwind CSS for utility-first CSS
- Radix UI for accessible components
- Lucide for beautiful icons
Made with β€οΈ for our furry friends π