A modern, responsive portfolio website built with Next.js, React, and TailwindCSS, featuring a robust meeting scheduling system, detailed analytics, and a clean, user-friendly interface.
- Live Demo
- Getting Started
- Environment Variables
- Features
- Technologies Used
- Project Structure
- Pages
- API Endpoints
- Contributing
Visit my portfolio
To get a local copy up and running, follow these simple steps.
- Node.js (v18 or later)
- npm or yarn
- Clone the repository:
git clone https://github.com/samrathreddy/portfolio cd portfolio - Install dependencies:
npm install # or yarn install - Set up environment variables:
Rename
.env.examplefile in the root of project to.envand add the necessary environment variables. - Run the development server:
npm run dev # or yarn dev - Open http://localhost:3000 with your browser to see the result.
You will need to rename .env.example file in the root of the project to .env and add the following environment variables:
# App
NEXT_PUBLIC_DISCORD_WEBHOOK_URL=
NEXT_PUBLIC_GA_MEASUREMENT_ID=
GOOGLE_CLIENT_ID = xxxxxxxx-xxxxxxxxxxxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET = xxxxxxxx-jQjxxxxxxxxxxxxxx0Nh7AW
GOOGLE_REDIRECT_URI = http://localhost:3000/api/auth/google/callback
# Google Calendar API settings
#Create Oauth client and access the page to generate the Google tokens - /admin/google-auth
GOOGLE_ACCESS_TOKEN =
GOOGLE_REFRESH_TOKEN =
GOOGLE_TOKEN_EXPIRY =
# MongoDB connection
MONGODB_URI=mongodb+srv://xxxxxxxxx/meeting
ADMIN_TIMEZONE = Asia/Kolkata
EMAIL_ADDRESS = [email protected]
# Make sure to remove localhost in prod environment - It might be a security vulnerable
ADMIN_ALLOWED_IPS=Your_PUBLIC_IP,localhost
#Resume
NEXT_PUBLIC_RESUME_EMBED_URL = https://drive.google.com/file/d/{id}/preview
NEXT_PUBLIC_RESUME_DOWNLOAD_URL = https://drive.google.com/uc?export=download&id={id}
# Frontend/CORS Configuration
# Allowed origins for CORS (comma-separated list)
# Example: https://your-domain.com,https://www.your-domain.com,http://localhost:3000
ALLOWED_ORIGINS=http://localhost:3000
# Primary frontend URL
# Example: https://your-domain.com
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
# Application base URL (for links in emails, etc.)
NEXT_PUBLIC_APP_URL=http://localhost:3000
- Modern & Responsive Design: Fully responsive layout that looks great on all devices.
- Meeting Scheduling: Integrated meeting booking system with Google Calendar.
- Admin Dashboard: A comprehensive admin panel to view analytics and manage meetings.
- Analytics: Tracking for page views, resume downloads, and meeting clicks.
- Server-Side Rendering (SSR): Fast initial page loads with Next.js.
- Animations: Smooth and subtle animations using Framer Motion.
- Customizable: Easily customizable with TailwindCSS.
- TypeScript Support: Strongly typed codebase for better developer experience.
- SEO Optimized: Built with SEO best practices in mind.
- Google Analytics: Integrated with Vercel Analytics.
- Framework: Next.js 14
- UI Library: React 18
- Language: TypeScript
- Styling: TailwindCSS
- Animations: Framer Motion
- UI Components: Radix UI, Hero Icons, Lucide React
- State Management: TanStack Query
- Database: MongoDB with Mongoose
- API: Next.js API Routes
- Authentication: Google OAuth
- Email: Nodemailer
- Date & Time: date-fns, date-fns-tz
- Analytics: Vercel Analytics
portfolio/
├── app/ # App router pages and layouts
│ ├── api/ # API routes
│ ├── admin/ # Admin dashboard pages
│ ├── meet/ # Meeting scheduling page
│ ├── resume/ # Resume page
│ ├── page.tsx # Home page
│ └── layout.tsx # Root layout
├── components/ # Reusable React components
├── config/ # Configuration files
├── lib/ # Library functions (e.g., database connection)
├── public/ # Static assets
├── styles/ # Global styles and Tailwind config
├── .env.local.example # Example environment variables
└── next.config.js # Next.js configuration
- Home (
/): The main landing page of the portfolio. - Resume (
/resume): A dedicated page to display the resume. - Meet (
/meet): A page for visitors to schedule a meeting. - Admin (
/admin): The admin dashboard with analytics and meeting management.- Meet Analytics (
/admin/meet-analytics): Analytics for meeting scheduling. - UTM Analytics (
/admin/utm-analytics): Analytics for UTM campaigns. (Pending) - Resume Analytics (
/admin/resume-analytics): Analytics for resume views and downloads. - Meetings (
/admin/meetings): A list of all scheduled meetings. - Meeting Details (
/admin/meetings/[id]): Details of a specific meeting.
- Meet Analytics (
- Authentication
GET /api/auth/google: Initiates Google OAuth login.GET /api/auth/google/callback: Handles the callback from Google after authentication.
- Meetings
GET /api/meetings: Fetches all meetings.GET /api/meetings/[id]: Fetches a specific meeting by ID.POST /api/book-meeting: Creates a new meeting.POST /api/reschedule-meeting: Reschedules an existing meeting.POST /api/cancel-meeting: Cancels an existing meeting.
- Availability
POST /api/available-slots: Fetches available time slots for meetings.
- Analytics (Admin : Private (IP based access))
POST /api/meet-tracking: Tracks events related to meeting scheduling.POST /api/resume-click: Tracks clicks on the resume button.POST /api/resume-download: Tracks resume downloads.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request