Skip to content

Commit 50a1f07

Browse files
Migrate contact form to EmailJS and update project dependencies
1 parent 1eb09b9 commit 50a1f07

File tree

6 files changed

+481
-134
lines changed

6 files changed

+481
-134
lines changed

README.md

Lines changed: 85 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,95 @@
1-
# Personal Portfolio Website
1+
# Lucas Becker - Portfolio Website
22

3-
A modern, responsive personal portfolio website built with cutting-edge web technologies.
3+
A modern, responsive portfolio website showcasing my skills, projects, and professional experience as a Full Stack Developer specializing in Java and React.
44

5-
## 🚀 Tech Stack
5+
![Portfolio Screenshot](https://via.placeholder.com/800x400?text=Portfolio+Screenshot)
66

7-
- **Framework**: [Next.js 14](https://nextjs.org/) - The React framework for production with App Router
8-
- **Language**: [TypeScript](https://www.typescriptlang.org/) - Strongly typed JavaScript
9-
- **Styling**: [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
10-
- **UI Components**: [shadcn/ui](https://ui.shadcn.com/) - Beautifully designed components built with Radix UI and Tailwind CSS
11-
- **Icons**: [Lucide React](https://lucide.dev/) - Beautiful & consistent icon set
12-
- **Theme**: [next-themes](https://github.com/pacocoursey/next-themes) - Dark mode with Next.js
13-
- **Form Handling**: [React Hook Form](https://react-hook-form.com/) with [Zod](https://zod.dev/) validation
14-
- **UI Primitives**: [Radix UI](https://www.radix-ui.com/) - Unstyled, accessible components for building high-quality design systems
15-
- **Animations**: [Tailwind CSS Animate](https://github.com/jamiebuilds/tailwindcss-animate) - Tailwind plugin for animations
7+
## Overview
168

17-
## ✨ Features
9+
This portfolio website serves as a comprehensive showcase of my professional journey, technical expertise, and project portfolio. It features a clean, responsive design with dark/light mode support and interactive elements to provide visitors with an engaging experience.
1810

19-
- Responsive design that works on all devices
20-
- Dark/Light mode toggle
21-
- Modern UI with shadcn/ui components
22-
- Type-safe development with TypeScript
23-
- Fast performance with Next.js App Router
24-
- Clean and maintainable code structure
11+
## Key Features
2512

26-
## 🛠️ Development
13+
- **Responsive Design**: Fully responsive layout that works seamlessly across desktop, tablet, and mobile devices
14+
- **Dark/Light Mode**: Theme toggle for user preference with system theme detection
15+
- **Interactive UI**: Smooth scrolling, hover effects, and animations for an engaging user experience
16+
- **Contact Form**: EmailJS-powered contact form with client-side validation
17+
- **SEO Optimized**: Structured metadata and semantic HTML for better search engine visibility
18+
- **Accessibility**: WCAG-compliant design elements for inclusive user experience
2719

28-
```bash
29-
# Install dependencies
30-
npm install
20+
## Technology Stack
3121

32-
# Run development server
33-
npm run dev
22+
### Frontend Framework & Libraries
3423

35-
# Build for production
36-
npm run build
24+
- **Next.js 14**: React framework with static site generation capabilities
25+
- **React 18**: Component-based UI development with hooks
26+
- **TypeScript**: Type-safe JavaScript for improved developer experience
27+
- **Tailwind CSS**: Utility-first CSS framework for responsive design
3728

38-
# Start production server
39-
npm start
40-
```
29+
### UI Components & Design
30+
31+
- **Radix UI**: Unstyled, accessible UI components
32+
- **Lucide Icons**: Beautiful, consistent icon set
33+
- **Tailwind CSS Animations**: Smooth transitions and animations
34+
- **Class Variance Authority**: Managing component variants
35+
- **Tailwind Merge**: Smart class name merging
36+
37+
### Form Handling & Validation
38+
39+
- **Zod**: TypeScript-first schema validation
40+
- **EmailJS**: Client-side email sending for the contact form
41+
- **Sonner**: Toast notifications for form feedback
42+
43+
### Performance & Optimization
44+
45+
- **Next.js Image Optimization**: Automatic image optimization
46+
- **Static Site Generation**: Pre-rendered HTML for fast loading
47+
- **Code Splitting**: Automatic code splitting for optimal loading
48+
49+
### Deployment & Hosting
50+
51+
- **GitHub Pages**: Static site hosting
52+
- **GitHub Actions**: Automated deployment workflow
53+
54+
## Project Structure
55+
56+
The project follows a clean, modular architecture:
57+
58+
- `/app`: Next.js app directory with page components and routing
59+
- `/components`: Reusable UI components
60+
- `/hooks`: Custom React hooks
61+
- `/lib`: Utility functions and shared code
62+
- `/public`: Static assets like images and fonts
63+
- `/config`: Configuration files for third-party services
64+
65+
## UI Components
66+
67+
The UI is built with a component-based approach using a combination of custom components and Radix UI primitives, styled with Tailwind CSS:
68+
69+
- **Button**: Multi-variant button component
70+
- **Card**: Container component for content sections
71+
- **Badge**: Label component for skills and technologies
72+
- **ThemeToggle**: Dark/light mode switcher
73+
- **Form Components**: Validated input fields with error states
74+
75+
## Contact Form
76+
77+
The contact form uses:
78+
79+
- **EmailJS**: For sending emails directly from the client-side
80+
- **Zod**: For form validation schema
81+
- **Sonner**: For toast notifications on submission success/failure
82+
83+
## Accessibility & Performance
84+
85+
The website is built with accessibility and performance in mind:
86+
87+
- **Semantic HTML**: Proper heading hierarchy and landmark regions
88+
- **ARIA attributes**: Enhanced screen reader support
89+
- **Keyboard navigation**: Full keyboard accessibility
90+
- **Color contrast**: WCAG AA compliant color schemes
91+
- **Optimized assets**: Compressed images and efficient code splitting
92+
93+
---
94+
95+
© 2024 Lucas Becker. All rights reserved.

app/api/contact/route.ts

Lines changed: 0 additions & 67 deletions
This file was deleted.

app/config/emailjs.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// EmailJS configuration
2+
export const emailjsConfig = {
3+
serviceId: 'service_jembd3i',
4+
templateId: 'template_297pelz',
5+
publicKey: 'vosE7BYImR1KoLcAS',
6+
};

app/page.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { useSmoothScroll } from "@/hooks/use-smooth-scroll"
1212
import Script from "next/script"
1313
import { z } from "zod"
1414
import { toast } from "sonner"
15+
import emailjs from '@emailjs/browser'
16+
import { emailjsConfig } from "@/app/config/emailjs"
1517

1618
// Skill component for highlighting technologies
1719
const Skill = ({ children }: { children: React.ReactNode }) => (
@@ -64,20 +66,17 @@ export default function Home() {
6466
}
6567

6668
try {
67-
// Send the form data to your API route
68-
const response = await fetch('/api/contact', {
69-
method: 'POST',
70-
headers: {
71-
'Content-Type': 'application/json',
69+
// Send the form data using EmailJS
70+
await emailjs.send(
71+
emailjsConfig.serviceId,
72+
emailjsConfig.templateId,
73+
{
74+
from_name: data.name,
75+
from_email: data.email,
76+
message: data.message,
7277
},
73-
body: JSON.stringify(data),
74-
});
75-
76-
const responseData = await response.json();
77-
78-
if (!response.ok) {
79-
throw new Error(responseData.error || 'Failed to send message');
80-
}
78+
emailjsConfig.publicKey
79+
);
8180

8281
// Reset the form using the stored reference
8382
form.reset();

0 commit comments

Comments
 (0)