A modern, interactive terminal-style portfolio website built with Next.js, featuring both terminal and visual interface modes.
- Terminal Mode: Interactive command-line interface with real terminal experience
- Interface Mode: Modern web UI with dark theme and responsive design
- Seamless switching between modes with persistent state
- Real-time command execution with typing effects
- Command history and autocompletion
- Variable assignment and data manipulation
- Print functionality for generating PDFs
- Session-based state persistence
- Responsive gallery with keyboard navigation
- Interactive feedback form
- Mobile-optimized layout (2 images per row on mobile)
- Dark theme with professional styling
The application uses Google Gemini 2.0 Flash AI model through Firebase Genkit for intelligent error handling:
Files:
src/ai/genkit.ts- AI configuration and setupsrc/ai/dev.ts- Development environment setupsrc/ai/flows/reasoned-error-messages.ts- AI flow for error message generation
How AI Works:
- Smart Error Messages: When users enter invalid commands, AI generates helpful, contextual error messages
- Context-Aware: AI understands the terminal context and provides relevant suggestions
- User-Friendly: Converts technical errors into understandable guidance
AI Flow Process:
// When an invalid command is entered:
const result = await generateReasonedErrorMessage({
unexpectedValue: userCommand,
context: "User tried to run a command in the terminal"
});
// Returns: Helpful, AI-generated error messageExample AI Responses:
- Input:
opne projects→ AI: "Did you mean 'open(projects)'? Check your spelling." - Input:
invalid_cmd→ AI: "Command not found. Try 'help' to see available commands."
- Framework: Next.js 14 with TypeScript
- Styling: Tailwind CSS with custom dark theme
- AI: Google Gemini 2.0 Flash via Firebase Genkit
- UI Components: Custom components with shadcn/ui
- State Management: React hooks with session storage
- Icons: Lucide React
src/
├── ai/ # AI integration
│ ├── genkit.ts # AI configuration
│ ├── dev.ts # Development setup
│ └── flows/ # AI flows
├── components/ # React components
│ ├── Terminal.tsx # Terminal interface
│ ├── InterfaceView.tsx # Visual interface
│ └── FeedbackForm.tsx # Contact form
├── data/ # JSON data files
├── hooks/ # Custom React hooks
├── lib/ # Utilities and command handler
└── app/ # Next.js app router
-
Clone the repository
git clone https://github.com/RmnRj/RC-Terminal.git cd RC-Terminal -
Install dependencies
npm install
-
Set up environment variables
# Create .env.local file GOOGLE_GENAI_API_KEY=your_gemini_api_key -
Run the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
| Command | Description |
|---|---|
help |
Show all available commands |
open(section) |
Open specific sections (projects, skills, etc.) |
printCopy(sections) |
Generate PDF of selected sections |
clear |
Clear terminal screen |
interface |
Switch to visual interface mode |
varName -> command |
Store command output in variable |
- Responsive Design: Works seamlessly on desktop and mobile
- Keyboard Navigation: Full keyboard support in gallery and terminal
- Print Functionality: Generate clean PDFs of portfolio sections
- Real-time Feedback: Interactive forms with validation
- Smart Suggestions: AI-powered command suggestions and error handling
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.