Skip to content

ranggautama47/advice_coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’» Daily Coding Advice

A minimalist React application that displays programming advice with a stunning glassmorphism UI. Built with Vite + React for optimal performance and developer experience.

React Vite CSS3

πŸ“Έ Screenshots

πŸ–₯️ Desktop View

Desktop Preview
✨ Glassmorphism UI with gradient effects on large screens



πŸ“± Mobile & Tablet Views

Mobile
Mobile (≀480px)
Tablet
Tablet (≀768px)

✨ Features

  • πŸ“– 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

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Functional components with Hooks
  • Vite - Next generation build tooling
  • ESLint - Code quality and consistency

Styling

  • CSS3 - Pure CSS with custom properties
  • Flexbox - Modern layout system
  • Glassmorphism - Frosted glass effect with backdrop-filter
  • CSS Variables - Dynamic theming with :root variables
  • Media Queries - Responsive breakpoints for all devices

Data Management

  • Local JSON - Static advice data source
  • React Hooks - useState & useEffect for state management

πŸ“‚ Project Structure

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

πŸš€ Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

  1. 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
    

🎯 How It Works

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

🎨 Design System

Color Palette
css

:root {
  --primary: #6366f1;        /* Indigo */
  --secondary: #ec4899;       /* Pink */
  --bg: #0d0e15;              /* Dark background */
  --card-bg: rgba(30, 31, 46, 0.6);  /* Glass effect */
}

Typography

Font Family: 'Inter', system-ui, sans-serif

Responsive Scaling: clamp() for fluid typography

Weights: 400 (regular), 600 (semibold), 800 (extrabold)

Effects

Glassmorphism: backdrop-filter: blur(16px)

Glow Effects: Radial gradients with blur

Smooth Transitions: 0.4s cubic-bezier easing

Hover States: Lift effect with shadows

πŸ“± Responsive Breakpoints

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 typography
  • backdrop-filter for glassmorphism
  • CSS Custom Properties for theming
  • Mobile-first approach with progressive enhancement

πŸ”§ Configuration

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
  }
})

🚦 Future Roadmap

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

🀝 Contributing

Contributions are welcome! Feel free to:

Fork the repository

Create a feature branch

Commit your changes

Push to the branch

Open a Pull Request

πŸ“ License

This project is open source and available under the MIT License.

πŸ‘¨β€πŸ’» Author

Rangga Utama

GitHub: @ranggautama47

Frontend Developer | Web Programming Enthusiast

πŸ™ Acknowledgments

Programming advice collected from experienced developers

Design inspiration from modern glassmorphism trends

Built with Vite + React for optimal learning experience

⭐ If you find this project helpful, please consider giving it a star!

About

A Vite + React mini project that showcases programming advice using local JSON data, React Hooks, and a fully responsive glassmorphism interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors