A modern Next.js-based code editor that allows users to write JavaScript code, run it, automatically fix common mistakes, and get help through an interactive help panel.
- Code Editor: Write and edit JavaScript code with a professional interface
- Run Code: Execute your code and see the output in real-time console
- Auto-Fix: Automatically fix common coding mistakes with one click
- Help System: Get instant help with keyword-based intelligent assistance
The Auto-Fix feature applies the following rules:
- Add Missing Semicolons: Automatically adds semicolons at the end of statements
- Fix Indentation: Properly indents code with 2 spaces per level
- Remove Extra Spaces: Removes unnecessary multiple spaces
- Fix Bracket Spacing: Ensures proper spacing before opening braces
- Fix Parentheses Spacing: Removes extra spaces inside parentheses
The help system intelligently responds to questions about:
- semicolon - Learn about semicolon usage
- function - Understand how to create and use functions
- variable - Learn about variable declaration (let, const)
- console - Understand console.log usage
- error - Get help with common errors
- loop - Learn about loops (for, while)
- if - Understand conditional statements
- array - Learn about arrays and array methods
- object - Understand objects and properties
- string - Learn about string manipulation
- run - How to run your code
- fix - How to use the auto-fix feature
- indent - Learn about proper indentation
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/coding-assistant.git
cd coding-assistant- Install dependencies:
npm install- Run the development server:
npm run dev- Open your browser: Visit http://localhost:3000
Type your JavaScript code in the editor area. The editor supports:
- Syntax highlighting
- Multi-line editing
- Tab support
- Click the "Run Code" button (green button with ▶ icon)
- View output in the console section below
- Errors will be displayed in red with descriptive messages
- Write your code (even with mistakes)
- Click the "Auto-Fix" button (blue button with 🔧 icon)
- Watch as your code gets automatically formatted and fixed
- Click the "Help" button (purple button with ❓ icon)
- Type your question in the input field
- Press Enter or click "Ask"
- Get instant help based on keywords in your question
- Next.js 16 - React framework with App Router
- React 19 - UI library with latest features
- TypeScript - Type-safe JavaScript
- Tailwind CSS v4 - Modern utility-first CSS framework
- Monaco Editor - Professional code editor component
coding-assistant/
├── src/
│ └── app/
│ ├── page.tsx # Main application component
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── public/ # Static assets
├── README.md # This file
├── package.json # Dependencies
└── tsconfig.json # TypeScript config
- Gradient Backgrounds with animated effects
- Glass-morphism design elements
- Smooth Animations on all interactions
- Professional Color Scheme (Purple, Blue, Pink gradients)
- macOS-style Window with traffic light dots
- Loading States on buttons during operations
- Custom Scrollbars for better aesthetics
- Responsive Design that works on all screen sizes
function test(x,y){
console.log("test")
let a=5
if(x>0){
return x+y
}
}console.log("Hello World");
let x = 10;
let y = 20;
console.log("Sum:", x + y);Try asking:
- "How do I use functions?"
- "What is a semicolon?"
- "Help with arrays"
Vanshita Pandey
- Email: vanshitapandey31017@gmail.com
- GitHub: @Vanshitaaa20
This project was created as part of an internship assignment for CodingJr.
Assignment Requirements:
- ✅ Code Editor with Run functionality
- ✅ Auto-Fix feature with multiple rules
- ✅ Help system with keyword matching
- ✅ Clean state management
- ✅ Modern UI with Tailwind CSS
- ✅ Complete documentation
- Add more auto-fix rules (camelCase conversion, etc.)
- Expand help database with more topics
- Add code saving/loading functionality
- Support for multiple programming languages
- Advanced syntax highlighting
- Code sharing via URL
- Dark/Light theme toggle
- Code execution history
This project was created for educational purposes as part of an internship assignment.
Made with ❤️ for CodingJr Internship