๐ ๐๐๐ถ๐น๐ ๐ ๐ ๐ผ๐ฑ๐ฒ๐ฟ๐ป ๐๐ ๐๐๐๐ถ๐๐๐ฎ๐ป๐
Most AI tutorials only show how to call an API. I wanted to build a real application. I used vanilla HTML, CSS, and JavaScript.
The app includes these features:
- Responsive UI
- Dark and Light modes
- Streaming responses
- Markdown rendering
- Syntax highlighting
- Chat history
- Error handling
- GitHub Pages deployment
I used these tools:
- HTML5 and CSS3
- Vanilla JavaScript
- Marked.js
- DOMPurify
- Prism.js
- Google Generative AI SDK
I focused on security. I used DOMPurify to clean AI responses. This prevents security risks.
I focused on user experience. The app streams text as it generates. You get immediate feedback. You do not wait for a loading icon.
I added Prism.js for code blocks. This adds language labels and copy buttons.
I used localStorage for chat history. Your conversations stay after you refresh the page. It is fast and needs no backend.
I added retry logic and error messages. This makes the app stable.
AI projects teach you many skills:
- API integration
- UI design
- State management
- User experience
Build projects like this for your portfolio. It shows you know practical skills.
What feature should I add next?
- Voice input
- File uploads
- Memory
Tell me in the comments.
Source: https://dev.to/codehuntersharath/i-built-a-modern-ai-assistant-using-html-css-and-javascript-4ca8 Optional learning community: https://youtu.be/nbFKG_6DkSE