Personal website and blog for posting about professional, personal, and financial development.
EN: Personal website for posting about professional, personal and financial development.
PT-BR: Site pessoal para postagens/tutoriais de desenvolvimento profissional, pessoal e financeiro.
- Next.js 14 - React framework with SSR/SSG
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- Netlify CMS - Git-based content management
- React Markdown - Markdown rendering
- Next SEO - SEO optimization
- Storybook - Component development and testing
- Jest & React Testing Library - Testing
- ESLint & Prettier - Code quality
- π Blog System - Markdown-based blog posts with frontmatter
- π¨ Custom Design - Tailwind CSS with custom fonts (Bw Gradual, Antarctican Mono)
- π± Responsive Design - Mobile-first approach
- π SEO Optimized - Meta tags, Open Graph, Twitter Cards, and sitemap generation
- π§ Contact Form - Email integration via Gmail OAuth2
- π― Content Management - Netlify CMS for easy content editing
- π§© Component Library - Storybook for component development
- π§ͺ Testing - Jest and React Testing Library setup
- β‘ Performance - Static site generation with Next.js
- π¨ Syntax Highlighting - Code blocks with syntax highlighting
- Node.js 16.9+ (for Corepack support)
- Yarn 4.0.1 (managed via Corepack)
- Git for version control
git clone https://github.com/eddcp/edupaivadev.com.git
cd edupaivadev.comcorepack enableyarn installCreate a .env.local file in the root directory:
# Gmail OAuth2 for Contact Form
CLIENT_ID=your_gmail_client_id
CLIENT_SECRET=your_gmail_client_secret
REFRESH_TOKEN=your_gmail_refresh_token
SMTP_USER=your_gmail_address@gmail.com
# Google Analytics (optional)
NEXT_PUBLIC_GA_ID=your_google_analytics_idNote: For Gmail OAuth2 setup, follow the Gmail API OAuth2 guide.
yarn devOpen http://localhost:3000 in your browser.
edupaivadev.com/
βββ public/
β βββ admin/ # Netlify CMS configuration
β β βββ config.yml
β βββ fonts/ # Custom fonts
β βββ img/ # Images and assets
β βββ robots.txt
βββ posts/ # Blog posts (Markdown files)
βββ src/
β βββ components/ # React components
β β βββ Analytics/
β β βββ ContactForm/
β β βββ Footer/
β β βββ Header/
β β βββ HeroSection/
β β βββ ...
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility libraries
β β βββ gtag.ts # Google Analytics
β β βββ md-client.ts # Markdown processing
β β βββ tags.ts # Tag utilities
β βββ pages/ # Next.js pages
β β βββ api/ # API routes
β β β βββ auth.ts # Netlify CMS auth
β β β βββ callback.ts # Netlify CMS callback
β β β βββ contact.ts # Contact form handler
β β βββ _app.tsx # App wrapper
β β βββ _document.tsx # Document wrapper
β β βββ index.tsx # Home page
β β βββ blog.tsx # Blog listing
β β βββ blog/[slug].tsx # Blog post page
β βββ styles/ # Global styles
β βββ templates/ # Page templates
β βββ types/ # TypeScript types
β βββ utils/ # Utility functions
βββ .storybook/ # Storybook configuration
βββ coverage/ # Test coverage reports
βββ storybook-static/ # Built Storybook
| Command | Description |
|---|---|
yarn dev |
Start development server on http://localhost:3000 |
yarn build |
Build production-ready application |
yarn start |
Start production server (requires yarn build first) |
yarn lint |
Run ESLint to check code quality |
yarn test |
Run Jest tests |
yarn test:watch |
Run tests in watch mode |
yarn test:ci |
Run tests in CI mode |
yarn storybook |
Start Storybook on http://localhost:6006 |
yarn build-storybook |
Build static Storybook |
This project uses Netlify CMS for content management. The CMS is configured in public/admin/config.yml.
- Git-based workflow - Content stored in Git repository
- Editorial workflow - Draft and review process
- Local backend - Test CMS locally with
local_backend: true - Markdown editor - Write posts in Markdown
- Production:
https://yourdomain.com/admin - Local:
http://localhost:3000/admin(withlocal_backend: true)
- Navigate to
/admin - Click "New Post"
- Fill in the frontmatter fields (title, date, tags, etc.)
- Write your content in Markdown
- Save as draft or publish
Custom theme configuration in tailwind.config.js:
- Primary color:
#1E1E26 - Secondary color:
#0F0D19 - Brand color (red):
#FF0043 - Neutral color:
#E9E7F5
- Bw Gradual - Main font family
- Antarctican Mono - Monospace font
Uses @tailwindcss/typography for beautiful markdown content styling.
Tests are written with Jest and React Testing Library:
# Run all tests
yarn test
# Run tests in watch mode
yarn test:watch
# Run tests for CI
yarn test:ci- Push your code to GitHub
- Import your repository in Vercel
- Add environment variables in Vercel dashboard
- Deploy!
The project is configured for Vercel with:
- Automatic deployments on push to
mainbranch - Preview deployments for pull requests
- Sitemap generation via
next-sitemap
Make sure to set these in your deployment platform:
CLIENT_IDCLIENT_SECRETREFRESH_TOKENSMTP_USERNEXT_PUBLIC_GA_ID(optional)
The contact form uses Gmail OAuth2 to send emails. To set it up:
- Create a Google Cloud Project
- Enable Gmail API
- Create OAuth2 credentials
- Set up OAuth2 Playground to get refresh token
- Add credentials to
.env.local
next.config.js- Next.js configurationtailwind.config.js- Tailwind CSS customizationtsconfig.json- TypeScript configurationjest.config.js- Jest testing configuration.eslintrc- ESLint rulesnext-sitemap.js- Sitemap generation confignext-seo.config.ts- SEO defaults
Blog posts are Markdown files in the posts/ directory with frontmatter:
---
title: Your Post Title
author: Eduardo Paiva
date: 2024-01-01 10:00:00
tags:
- tag1
- tag2
categories:
- category-name
thumbnail: https://images.unsplash.com/...
featured_image:
src: https://images.unsplash.com/...
alt: Image description
---
Your markdown content here...- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and proprietary.
Eduardo Paiva
- Website: edupaivadev.com
- Twitter: @edupaivadev
Made with β€οΈ using Next.js and Tailwind CSS