Skip to content

Commit

Permalink
feat: update image paths and chat authentication
Browse files Browse the repository at this point in the history
- Fix electrical wiring image paths in gallery
- Update portfolio project image format to webp
- Fix OpenAI model name
- Clean up Next.js cache
  • Loading branch information
while-basic committed Dec 1, 2024
1 parent 466188b commit cacd412
Show file tree
Hide file tree
Showing 70 changed files with 182 additions and 381 deletions.
80 changes: 73 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The workflow checks:
- ESLint linting
- Next.js build process

## Todos
## Todos should be completed starting from the most easiest to implement. The Todo list should be updated periodically and in order from easiest to most difficult for the AI to implement.

- [-] Initial setup
- [-] center navlinks
Expand All @@ -100,30 +100,44 @@ The workflow checks:
- [-] Gallery section
- [-] Education section
- [-] Project tiles should be clickable
- [ ] Dark mode implementation
- [ ] Add resume page
- [ ] Fix light/dark modes
- [-] Add resume page
- [-] add cover letter podcast clip
- [-] add resume podcast clip
- [ ] Light mode implementation
- [-] Add case studies
- [ ] Visitor counter
- [ ] Contact form
- [ ] Set up resend email
- [-] Add breadcrumbs
- [x] Add breadcrumbs to chat page
- [ ] Add Supabase integration
- [-] Add animations
- [-] Add unit tests
- [ ] Add resume download
- [ ] Add social media links
- [ ] Image generation
- [ ] Audio section
- [-] Chatbot
- [-] Chatbot for users signed in
- [ ] Admin dashboard
- [ ] Total visitors
- [ ] Total messages
- [ ] Total users
- [ ] Chat history
- [-] Add SEO
- [-] Add blog
- [-] Secret audio page
- [ ] Deepgram API for speech to text
- [-] Responsive
- [ ] Responsive on mobile
- [-] Loading screen
- [ ] Update README.md
- [ ] Update all pages that have personal information that needs to be updated
- [ ] Add footer
- [ ] Add analytics
- [ ] Add analytics to dashboard
- [ ] Add settings page
- [ ] Projects tiles need to navigate to a case study page
- [ ] Blog heading needs to be styled correctly
- [-] Chat should have a notice about it being used for signed in users only

## Projects

Expand Down Expand Up @@ -162,4 +176,56 @@ Built using:
git status
git add .
git commit -m "update"
git push origin main
git push origin main

## Personalizing Your Fork

After forking this repository, you'll need to update the following:

### Required Updates
1. **Personal Information**
- `/app/config/site.ts`: Update site metadata, name, and social links
- `/app/components/about.tsx`: Modify the about section content
- `/app/components/hero.tsx`: Update hero section with your name and title
- `/public/images/`: Replace profile and project images

2. **Project Details**
- `/app/projects/page.tsx`: Update project cards with your own projects
- `/app/projects/[slug]/page.tsx`: Create case studies for your projects

3. **Resume and Experience**
- `/app/resume/page.tsx`: Update with your experience and education
- `/public/resume.pdf`: Replace with your resume file

4. **Environment Variables**
- Copy `.env.example` to `.env.local`
- Update the following variables:
```
DATABASE_URL=your_database_url
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key
RESEND_API_KEY=your_resend_api_key
```
### Optional Updates
- `/app/blog/`: Add your own blog posts
- `/app/components/footer.tsx`: Update footer links and information
- `/app/components/nav.tsx`: Modify navigation items
- `/public/favicon.ico`: Replace with your own favicon
- `/app/layout.tsx`: Update metadata and default SEO settings
## Development Notes
### Git Commands
```bash
git status
git add .
git commit -m "update"
git push origin main
```

### Deployment
This project can be deployed on Vercel or any other Next.js-compatible hosting platform. Make sure to:
1. Configure environment variables in your hosting platform
2. Set up the necessary database connections
3. Update the deployment settings as needed
19 changes: 18 additions & 1 deletion app/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
"use client"

import { useState } from "react"
import { useState, useEffect } from "react"
import { Button } from "@/components/ui/button"
import { ArrowLeft, Bot } from "lucide-react"
import Link from "next/link"
import { MessageList, type Message } from "@/components/chat/message-list"
import { ChatInput } from "@/components/chat/chat-input"
import { motion, AnimatePresence } from "framer-motion"
import { useAuth } from "@/lib/auth-context"
import { AuthDialog } from "@/components/chat/auth-dialog"

export default function ChatPage() {
const [messages, setMessages] = useState<Message[]>([])
const [isLoading, setIsLoading] = useState(false)
const { user, loading } = useAuth()
const [showAuthDialog, setShowAuthDialog] = useState(false)

useEffect(() => {
if (!loading && !user) {
setShowAuthDialog(true)
}
}, [user, loading])

const handleSendMessage = async (content: string) => {
if (!user) {
setShowAuthDialog(true)
return
}
const userMessage: Message = { role: "user", content }
setMessages(prev => [...prev, userMessage])
setIsLoading(true)
Expand Down Expand Up @@ -49,6 +63,9 @@ export default function ChatPage() {

return (
<div className="flex flex-col min-h-screen bg-gradient-to-b from-background to-muted/20">
{/* Auth Dialog */}
<AuthDialog open={showAuthDialog} onOpenChange={setShowAuthDialog} />

{/* Header */}
<div className="fixed top-0 left-0 right-0 z-50 border-b bg-background/80 backdrop-blur-lg supports-[backdrop-filter]:bg-background/60">
<div className="flex items-center h-16 px-4 max-w-6xl mx-auto">
Expand Down
37 changes: 31 additions & 6 deletions app/gallery/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export default function GalleryPage() {

const galleryItems: GalleryItem[] = [
{
title: "Data Center Operations",
category: "Industrial Automation",
description: "Managing and optimizing data center infrastructure and operations",
imageSrc: "/images/gallery/data-center.jpg",
title: "Electrical Panels",
category: "Electrical Panels",
description: "Managing and optimizing electrical panels",
imageSrc: "/public/images/electrical/dist1.jpg",
additionalImages: [
"/images/gallery/data-center/1.jpg",
"/images/gallery/data-center/2.jpg",
Expand All @@ -51,6 +51,31 @@ export default function GalleryPage() {
"/images/gallery/manufacturing/3.jpg",
]
},
{
title: "Electrical Wiring",
category: "Electrical Wiring",
description: "Wired electrical panels",
imageSrc: "/images/electrical/wiring-1.jpg",
additionalImages: [
"/images/electrical/wiring-2.jpg",
"/images/electrical/wiring-3.jpg",
"/images/electrical/wiring-4.jpg",
"/images/electrical/wiring-5.jpg",
"/images/electrical/wiring-6.jpg",
"/images/electrical/wiring-7.jpg",
]
},
{
title: "SDXL Image Generation",
category: "Software Development",
description: "Advanced AI image generation using Stable Diffusion XL",
imageSrc: "/images/gallery/sdxl.jpg",
additionalImages: [
"/images/gallery/sdxl/1.jpg",
"/images/gallery/sdxl/2.jpg",
"/images/gallery/sdxl/3.jpg",
]
},
{
title: "EcoTrack",
description: "Environmental monitoring dashboard for real-time data analysis",
Expand Down Expand Up @@ -88,9 +113,9 @@ export default function GalleryPage() {
title: "MIDI Saber",
category: "Personal Projects",
description: "Interactive musical instrument using motion sensors",
imageSrc: "/images/gallery/midi-saber.jpg",
imageSrc: "/public/images/projects/midi-saber.png",
additionalImages: [
"/images/gallery/midi-saber/1.jpg",
"/public/images/projects/midi-saber.png",
"/images/gallery/midi-saber/2.jpg",
"/images/gallery/midi-saber/3.jpg",
]
Expand Down
2 changes: 1 addition & 1 deletion app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ProjectsPage() {
tags: ["Next.js", "TypeScript", "Tailwind CSS", "Framer Motion"],
githubUrl: "https://github.com/christophercelaya/portfolio",
liveUrl: "https://christophercelaya.com",
imageUrl: "/images/projects/portfolio.jpg",
imageUrl: "/images/projects/portfolio.webp",
slug: "portfolio-website"
},
{
Expand Down
41 changes: 41 additions & 0 deletions components/chat/auth-dialog.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
'use client'

import { useRouter } from 'next/navigation'
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogDescription,
} from "@/components/ui/dialog"

interface AuthDialogProps {
open: boolean
onOpenChange: (open: boolean) => void
}

export function AuthDialog({ open, onOpenChange }: AuthDialogProps) {
const router = useRouter()

return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent>
<DialogHeader>
<DialogTitle>Sign in Required</DialogTitle>
<DialogDescription>
Please sign in to use the chat feature. This helps us provide a better experience and protect our services.
</DialogDescription>
</DialogHeader>
<div className="flex justify-end space-x-2">
<Button variant="secondary" onClick={() => onOpenChange(false)}>
Close
</Button>
<Button onClick={() => router.push('/auth/sign-in')}>
Sign In
</Button>
</div>
</DialogContent>
</Dialog>
)
}
2 changes: 1 addition & 1 deletion lib/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const openai = new OpenAI({
export async function generateChatResponse(messages: { role: 'user' | 'assistant', content: string }[]) {
try {
const completion = await openai.chat.completions.create({
model: "gpt-4o", // Latest GPT-4o model
model: "gpt-4o", // Latest GPT-4 model
messages: messages,
temperature: 0.7, // Balanced between creative and focused
max_tokens: 250, // Increased token limit for longer responses
Expand Down
1 change: 0 additions & 1 deletion public/audio/resume-intro.mp3

This file was deleted.

1 change: 0 additions & 1 deletion public/audio/resume-outro.mp3

This file was deleted.

Binary file added public/images/companies/cnwire.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/companies/t5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/education/epcc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/education/uta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/education/utep.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/dist1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/dist2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/dist3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/dist4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/dist5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/dist6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/panel1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/panel2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-14.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/electrical/wiring-6.jpg
Binary file added public/images/electrical/wiring-7.jpg
Binary file added public/images/electrical/wiring-8.jpg
Binary file added public/images/electrical/wiring-9.jpg
Binary file added public/images/mechanical/06262019_010824 2.mov
Binary file not shown.
Binary file added public/images/mechanical/IMG_0056_Original 2.jpg
Binary file added public/images/mechanical/IMG_0083_Original 2.jpg
Binary file added public/images/mechanical/IMG_0092_Original 2.jpg
Binary file added public/images/mechanical/IMG_0176_Original 2.jpg
Binary file added public/images/mechanical/IMG_0456_Original 2.jpg
Binary file added public/images/mechanical/IMG_1179_Original 2.jpg
Binary file added public/images/mechanical/IMG_3325_Original 2.jpg
Binary file added public/images/mechanical/IMG_3326_Original 2.jpg
Binary file added public/images/mechanical/IMG_3395_Original 2.jpg
Binary file added public/images/mechanical/IMG_3400_Original 2.jpg
Binary file added public/images/mechanical/IMG_3499_Original 2.jpg
Binary file added public/images/mechanical/IMG_3522_Original 2.jpg
Binary file added public/images/mechanical/IMG_3556_Original 2.jpg
Binary file added public/images/mechanical/IMG_3559_Original 2.jpg
Binary file added public/images/mechanical/IMG_3565_Original 2.jpg
Binary file added public/images/projects/amica.webp
Binary file not shown.
Binary file added public/images/projects/blender.webp
Binary file not shown.
Binary file added public/images/projects/law-gpt.webp
Binary file not shown.
Binary file added public/images/projects/medchat.png
Binary file added public/images/projects/medchat.webp
Binary file not shown.
Binary file added public/images/projects/midi-saber.png
Binary file added public/images/projects/midi-saber.webp
Binary file not shown.
Binary file added public/images/projects/top-level.webp
Binary file not shown.
Binary file added public/images/projects/unity-game.webp
Binary file not shown.
Binary file added public/images/projects/unity.webp
Binary file not shown.
34 changes: 17 additions & 17 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://chriscelaya.com/auth/sign-in</loc><lastmod>2024-12-01T06:31:53.250Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/about</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.8</priority></url>
<url><loc>https://chriscelaya.com/case-studies</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
<url><loc>https://chriscelaya.com/blog/hello-world</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/blog</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/auth/sign-up</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/chat</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/experience</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.8</priority></url>
<url><loc>https://chriscelaya.com/audio-recorder</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/profile</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/gallery</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>
<url><loc>https://chriscelaya.com/resume</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/dashboard</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/skills</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/projects</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
<url><loc>https://chriscelaya.com/audio</loc><lastmod>2024-12-01T06:31:53.252Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/audio-recorder</loc><lastmod>2024-12-01T09:21:37.998Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/blog/hello-world</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/auth/sign-up</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/case-studies</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
<url><loc>https://chriscelaya.com/dashboard</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/profile</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/chat</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/about</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.8</priority></url>
<url><loc>https://chriscelaya.com/gallery</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>
<url><loc>https://chriscelaya.com/resume</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/projects</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
<url><loc>https://chriscelaya.com/skills</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/audio</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/experience</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.8</priority></url>
<url><loc>https://chriscelaya.com/auth/sign-in</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://chriscelaya.com/blog</loc><lastmod>2024-12-01T09:21:38.000Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
</urlset>
49 changes: 0 additions & 49 deletions src/components/Auth.js

This file was deleted.

Loading

0 comments on commit cacd412

Please sign in to comment.