A minimalist React application that displays programming advice with a stunning glassmorphism UI. Built with Vite + React for optimal performance and developer experience.
- π Sequential Advice Display - Browse through programming advice one by one
- π Smooth Transitions - Elegant fade and scale animations between advice
- π Reading Counter - Track how many advice you've read
- π¨ Glassmorphism Design - Modern UI with blur effects and gradients
- π± Fully Responsive - Perfect on mobile, tablet, and desktop
- β‘ Lightning Fast - Built with Vite for instant HMR and optimal builds
- React 18 - Functional components with Hooks
- Vite - Next generation build tooling
- ESLint - Code quality and consistency
- CSS3 - Pure CSS with custom properties
- Flexbox - Modern layout system
- Glassmorphism - Frosted glass effect with
backdrop-filter - CSS Variables - Dynamic theming with
:rootvariables - Media Queries - Responsive breakpoints for all devices
- Local JSON - Static advice data source
- React Hooks -
useState&useEffectfor state management
advice_coding/
βββ public/ # Static assets
βββ screenshot/
β βββ hp.png
β βββ ipad.png
β βββ laptop.png
βββ src/
β βββ assets/ # Images and icons
β βββ data/ # JSON data files
β β βββ advices.json # Programming advice collection
β βββ components/ # Reusable components
β βββ App.jsx # Main application component
β βββ App.css # Component-specific styles
β βββ index.css # Global styles
β βββ main.jsx # Application entry point
βββ index.html # HTML template
βββ package.json # Dependencies and scripts
βββ vite.config.js # Vite configuration
βββ README.md # Project documentation
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/ranggautama47/advice_coding.git cd advice_coding Install dependencies bash npm install # or yarn install Start development server bash npm run dev # or yarn dev Open your browser text http://localhost:5173
Core Logic
Data Loading - Advice data is imported from advices.json using useEffect
State Management - currentIndex tracks the displayed advice
User Interaction - Clicking the button triggers:
Fade-out animation
Index increment (with modulo for looping)
Counter increment
Fade-in animation with new advice
Visual Feedback - Smooth transitions and counter updates
Key React Concepts Demonstrated
β
Functional Components
β
useState Hook for state management
β
useEffect Hook for side effects
β
Event Handling
β
Conditional Rendering
β
Dynamic Styling with JavaScript
Color Palette
css
:root {
--primary: #6366f1; /* Indigo */
--secondary: #ec4899; /* Pink */
--bg: #0d0e15; /* Dark background */
--card-bg: rgba(30, 31, 46, 0.6); /* Glass effect */
}
Font Family: 'Inter', system-ui, sans-serif
Responsive Scaling: clamp() for fluid typography
Weights: 400 (regular), 600 (semibold), 800 (extrabold)
Glassmorphism: backdrop-filter: blur(16px)
Glow Effects: Radial gradients with blur
Smooth Transitions: 0.4s cubic-bezier easing
Hover States: Lift effect with shadows
| Device | Screen Size | CSS Media Query | Key Adjustments |
|---|---|---|---|
| π± Mobile | β€ 480px |
@media (max-width: 480px) |
β’ Card padding: 25px 20pxβ’ Button: width: 100%β’ Glow blur: 50pxβ’ Border radius: 20px |
| π Tablet | β€ 768px |
@media (max-width: 768px) |
β’ Container padding: 15pxβ’ Content padding: 10pxβ’ Optimized touch targets |
| π» Desktop | β₯ 1024px |
@media (min-width: 1024px) |
β’ Title size: 4.5remβ’ Card padding: 60pxβ’ Content max-width: 700px |
| π₯οΈ Large Desktop | β₯ 1440px |
@media (min-width: 1440px) |
β’ Enhanced visual hierarchy β’ Maximum container width β’ Premium spacing |
Key CSS Techniques Used:
clamp()for fluid typographybackdrop-filterfor glassmorphism- CSS Custom Properties for theming
- Mobile-first approach with progressive enhancement
Vite Configuration (vite.config.js) javascript
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
open: true
}
})
Random Mode - Shuffle advice randomly
Dark/Light Theme - Theme toggle with CSS variables
API Integration - Fetch advice from external API
Categories - Filter advice by programming language/topic
Favorites - Save favorite advice
Share Feature - Share advice on social media
Keyboard Shortcuts - Spacebar for next advice
Contributions are welcome! Feel free to:
Fork the repository
Create a feature branch
Commit your changes
Push to the branch
Open a Pull Request
This project is open source and available under the MIT License.
Rangga Utama
GitHub: @ranggautama47
Frontend Developer | Web Programming Enthusiast
Programming advice collected from experienced developers
Design inspiration from modern glassmorphism trends
Built with Vite + React for optimal learning experience


