Mind & Metrics Branding is a Next.js-based web application for a B2B growth marketing agency. The application features a modern, accessible design with comprehensive branding, website development, SEO, and marketing services. It includes interactive components like a service assessment quiz, case studies showcase, and job application system.
- Overview
- Installation
- Running the Application
- Linting and Type Checking
- Testing
- Technologies Used
- Project Structure
- Environment Variables
- Deployment
- Continuous Integration
- Code Style and Conventions
- Performance Optimization
- Accessibility
- Browser Support
- Contributors
- Additional Resources
- Clone the repository:
git clone [email protected]:Mind-Metrics-Branding/mind-and-metrics-branding.git
- Navigate to the project directory:
cd mind-and-metrics-branding
- Install dependencies:
npm install
- Set up environment variables (see Environment Variables section).
To run the development server:
npm run dev
Open http://localhost:3000 in your browser to view the application.
This project uses ESLint for linting and TypeScript for type checking. To run these checks:
- Linting:
npm run lint
- Type Checking:
npm run type-check
This project uses Cypress for end-to-end testing. To run the tests:
-
Run tests in headless mode:
npm run test
-
Open Cypress Test Runner:
npm run test:ui
- Next.js (v14.2.13) - React framework for production-grade applications
- React (v18) - JavaScript library for building user interfaces
- TypeScript (v5) - Typed JavaScript for enhanced development
- Tailwind CSS (v3.4.1) - Utility-first CSS framework
- Framer Motion (v11.11.10) - Animation library for React
- SendGrid (v8.1.4) - Email delivery service
- React Hook Form (v7.53.1) - Form validation and handling
- React Dropzone (v14.3.5) - File upload component
- React Toastify (v10.0.6) - Toast notifications
- Sharp (v0.33.5) - High-performance image processing
- Cypress (v13.15.1) - End-to-end testing framework
The project follows Next.js 14 app directory structure:
-
app/
: Next.js app directoryabout/
: About page and componentscareers/
: Careers section and job postingscontact/
: Contact page and formget-started/
: Assessment quizprivacy-policy/
: Privacy policyservices/
: Services pageslayout.tsx
: Root layoutpage.tsx
: Home page
-
components/
: Shared componentscommon/
: Site-wide componentsContact/
: Contact form componentsQuiz/
: Quiz componentspages/
: Page-specific components
-
cypress/
: Test filesfixtures/
: Test datatests/
: Test suites
-
data/
: Static content -
lib/
: Utility functions -
public/
: Static assets -
styles/
: Global styles
Key components and pages:
app/page.tsx
: Homepage with hero, value proposition, and case studiesapp/about/page.tsx
: About page with team members and company informationapp/get-started/page.tsx
: Interactive service assessment quizapp/services/page.tsx
: Comprehensive service offeringsapp/careers/page.tsx
: Job listings and application systemapp/contact/page.tsx
: Contact form and location information
This project uses environment variables for configuration. Create a .env.local
file in the root directory and add the following variables:
# SendGrid Configuration
PRODUCTION_SENDGRID_API_KEY=your_sendgrid_api_key
[email protected]
[email protected]
[email protected]
# SendGrid Configuration
STAGING_SENDGRID_API_KEY=your_staging_sendgrid_api_key
[email protected]
[email protected]
[email protected]
PRODUCTION_SENDGRID_API_KEY
: SendGrid API key for production environmentPRODUCTION_RECEIVER_EMAIL
: Primary email for receiving form submissionsPRODUCTION_RECEIVER_EMAIL_CC
: CC email for form submissionsPRODUCTION_SENDER_EMAIL
: Sender email for automated messagesSTAGING_SENDGRID_API_KEY
: SendGrid API key for staging environmentSTAGING_RECEIVER_EMAIL
: Primary email for receiving test submissionsSTAGING_RECEIVER_EMAIL_CC
: CC email for test submissionsSTAGING_SENDER_EMAIL
: Sender email for test messages
Note: Never commit your .env.local
file to version control. It's included in the .gitignore
file by default.
To use these variables in your Next.js application, you can access them via process.env.VARIABLE_NAME
.
The application is deployed using Vercel. Note that you need to be a member of Mind and Metrics Branding to access it. There are two environments:
- Staging: https://staging.mindandmetricsbranding.com
- Production: https://mindandmetricsbranding.com
This project uses CircleCI for continuous integration. The configuration can be found in .circleci/config.yml
.
The CircleCI configuration defines a job called build-and-test
that runs on every push to branches other than main
and staging
. This job:
- Uses the
cypress/browsers:latest
Docker image - Checks out the code
- Installs npm packages
- Builds the project
- Starts the server in the background
- Runs Cypress tests
- Stores test artifacts (videos and screenshots)
For more details on CircleCI configuration and how to set up continuous deployment, refer to the CircleCI documentation.
This project follows specific coding conventions to maintain consistency across the codebase:
- TypeScript for type safety and better developer experience
- Next.js 14 App Router conventions and best practices
- Functional React components with hooks
- Tailwind CSS for styling with custom design system
- Comprehensive SEO metadata implementation (see examples in app/layout.tsx lines 8-41)
- Consistent file and folder structure in the app directory
- Component organization:
- Common components in
components/common
- Page-specific components in
components/pages
- Form components in
components/Contact
andcomponents/Quiz
- Common components in
The project implements several performance optimization techniques:
- Sharp for image processing and optimization
- Proper image dimensions and formats in OpenGraph metadata
- Consistent metadata structure across all pages
- Optimized Opengraph and Twitter card implementations
- Proper heading hierarchy for SEO
- Next.js App Router for server-side rendering
- Proper route segmentation for optimal code splitting
- Environment-specific configurations for staging and production
We strive to make this website accessible to all users. We maintain WCAG compliance and accessibility best practices. Some of our accessibility features include:
- Cypress axe for automated accessibility testing
- Semantic HTML structure
- ARIA attributes where necessary
- Keyboard navigation support
- Color contrast compliance
- Alt text requirements for all images
This website is tested and supported on the following browsers:
- Chrome (latest 2 versions)
- Firefox (latest 2 versions)
- Safari (latest 2 versions)
- Edge (latest 2 versions)
For older browsers, we provide graceful degradation of features.
Travis Rollins |
---|
- Next.js Documentation - Learn about Next.js features and API
- React Documentation - React fundamentals and advanced concepts
- TypeScript Documentation - TypeScript language reference
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library for React
- React Hook Form - Form validation and handling
- React Dropzone - File upload component
- React Toastify - Toast notifications
- Sharp Documentation - High-performance image processing
- SendGrid Documentation - Email delivery service
- Cypress Documentation - End-to-end testing framework