- Overview
- Features
- Tech Stack
- Installation
- Usage
- Project Structure
- Challenges & Lessons Learned
- Contributing
- License
- Author
Welcome to SARS Blog! 🌟 This is a personal blog website built as a Single Page Application (SPA) using React. It's my digital space to share thoughts, projects, and motivational quotes—documenting my journey as a web developer and student at IIIT Bhagalpur.
Inspired by the need for a simple, customizable platform free from social media constraints, this blog features categorized posts on development projects, DSA visualizations, and original motivational quotes. It's designed for easy navigation, smooth scrolling, and a clean, modern UI. Whether you're here for tech tips, coding inspiration, or just a quick read, feel free to explore!
This project showcases my skills in React fundamentals, routing, state management (via props), and responsive design—perfect for a portfolio piece.
- Dynamic Routing: Navigate seamlessly between Home, Posts categories (Development, DSA, Quotes), and About using React Router.
- Categorized Content: Organized sections for tech projects, algorithms, and motivational quotes with card-based layouts.
- Auto-Scroll to Top: Smooth user experience on route changes.
- Responsive Design: Mobile-friendly with custom CSS for a polished look.
- Dynamic Footer: Auto-updates copyright year.
- Extensible Structure: Easy to add new posts or categories by updating component arrays.
- SEO-Friendly: Semantic HTML with sections and headings for better accessibility.
## Tech Stack
---
## 🎨 Frontend Tech Stack
| **Technology** | **Version** | **Purpose** | **Documentation** |
| ---------------------------------------------------------------------------- | ----------- | ---------------------------------------- | -------------------------------------------------------------------------- |
| [React](https://react.dev/) | 18+ | Building interactive UI components | [Docs](https://react.dev/learn) |
| [React Router](https://reactrouter.com/) | 6+ | Client-side routing for SPA navigation | [Docs](https://reactrouter.com/en/main/start/overview) |
| [Vite](https://vitejs.dev/) | 5.0+ | Fast development server and bundler | [Docs](https://vitejs.dev/guide/) |
| [JavaScript (ES6+)](https://developer.mozilla.org/en-US/docs/Web/JavaScript) | ES6+ | Core logic and data handling | [MDN Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide) |
| [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) | 3+ | Custom styling for layout and animations | [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/CSS) |
---
## 🧰 Development Tools
| **Tool** | **Purpose** | **Documentation** |
| ----------------------------------------- | ------------------------------------------------------ | ------------------------------------------ |
| [ESLint](https://eslint.org/) | Code linting and style consistency | [Docs](https://eslint.org/docs/latest/) |
| [Git](https://git-scm.com/) | Version control with GitHub integration | [Docs](https://git-scm.com/doc) |
| [VS Code](https://code.visualstudio.com/) | IDE for frontend development (with Prettier extension) | [Docs](https://code.visualstudio.com/docs) |
-
Clone the Repository:
git clone https://github.com/DevSars24/sars-blog.git # Replace with your actual repo URL cd sars-blog -
Install Dependencies:
npm installThis installs React, React Router, and other dev tools via Vite.
-
Run the Development Server:
npm run devOpens at
http://localhost:5173(or similar port). Hot reload enabled for instant updates! -
Build for Production:
npm run buildOutputs optimized files to
dist/folder.
- Start the app with
npm run devand openhttp://localhost:5173. - Navigate:
- Home (/): Read the welcome intro.
- Posts (/posts): Choose categories like Development Based Projects, DSA Based Projects, or My Own Motivational Quotes.
- About (/about): Learn more about me!
- Explore Content:
- Click category links to view post cards.
- Each post includes title, summary, and date—expandable for full articles in future updates.
- Customize:
- Edit post arrays in components (e.g.,
DevelopmentPosts.js) to add your own content. - Style tweaks in
App.cssor component-specific CSS.
- Edit post arrays in components (e.g.,
Example: Adding a new DSA post—just push to the posts array in DSAPosts.js:
{
title: "🌐 Graph Traversal Viz",
content: "Visualizing BFS and DFS with animations.",
date: "October 25, 2025"
}sars-blog/
├── public/ # Static assets (e.g., favicon)
├── src/
│ ├── components/ # Reusable components
│ │ ├── Home.js
│ │ ├── Posts.js
│ │ ├── About.js
│ │ ├── DevelopmentPosts.js
│ │ ├── DSAPosts.js
│ │ └── QuotesPosts.js
│ ├── App.js # Main app with routing
│ ├── App.css # Global styles
│ ├── index.css # Base styles
│ └── main.js # Entry point
├── index.html # Vite template
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
└── README.md # This file!
- Routing Setup: Integrating React Router v6 was smooth, but ensuring
ScrollToTophooked intouseLocationrequired carefuluseEffectdependency management to avoid infinite scrolls. - State Management: Kept it simple with static arrays in components—learned props drilling isn't always needed for small apps, but Redux could scale for dynamic data.
- Styling: Custom CSS for cards and typing effects (in header) taught responsive breakpoints; Tailwind could be a future upgrade for faster iteration.
- Content Scalability: Hardcoded posts work for MVP, but integrating a CMS like Contentful would handle real-time updates.
- Key Takeaway: Start with Vite for blazing-fast dev—React SPAs feel snappier out of the box. Test on mobile early!
-
Build the App:
npm run build -
Host It:
- Vercel (Recommended for React): Connect GitHub repo, auto-deploys on push. Free tier with custom domains.
- Netlify: Drag
dist/folder or link GitHub. Supports previews for PRs. - GitHub Pages: Add
vite.config.jsfor base path, then deploy viagh-pagesnpm package.- Install:
npm i gh-pages --save-dev - Script:
"deploy": "gh-pages -d dist"
- Install:
-
Pro Tips:
- Set environment vars if adding API integrations (e.g., for dynamic posts).
- Use a custom domain via your host's DNS settings.
Love the project? Help make it better! 🚀
- Fork the repo and create a feature branch (
git checkout -b feature/new-post-category). - Commit your changes (
git commit -m 'Add: New DSA visualization post'). - Push to the branch (
git push origin feature/new-post-category). - Open a Pull Request—describe your changes and why they rock!
- Run
npm run lint(if ESLint added) before submitting.
Ideas? Open an Issue for features like search, dark mode, or backend integration.
See CONTRIBUTING.md for more details. Stars and feedback appreciated!
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by Saurabh Singh Rajput
- Portfolio: sars24.netlify.app
- LinkedIn: Saurabh Singh
- X/Twitter: @SaurabhSin15850
- Email: saurabhsingh100605@gmail.com
Thanks for stopping by—let's connect and build something awesome! 💻