Skip to content

πŸͺ DevVerse CS Blog – A modern, high-performance blog built with Next.js, Vercel, TypeScript, MDX, and Framer Motion, featuring real-time search, dynamic routing, and optimized SEO for deep dives into computer science and software engineering topics.

License

Notifications You must be signed in to change notification settings

hoangsonww/DevVerse-SWE-Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevVerse Computer Science & Software Engineering Blog

A modern, high-performance blog built with Next.js, leveraging MDX for content, PWA capabilities, and a rich ecosystem of libraries including Framer Motion, KaTeX, and more. This project is designed for scalability, maintainability, and an excellent developer experience.

TypeScript MDX Next.js Tailwind CSS Docker React Prettier ESLint Framer Motion Progressive Web App

Table of Contents

Overview

This repository hosts a Next.js-based blog that uses MDX to write rich, interactive content. The app combines server-side rendering, static site generation, and client-side rendering to deliver fast and SEO-friendly pages. It also includes modern features such as PWA support, image optimization, and seamless animations using Framer Motion.

The blog covers a wide range of topics in computer science and software engineering, providing educational content, tutorials, and insights for developers of all levels. The content is written in MDX, allowing for a mix of Markdown and React components to create engaging posts. Additionally, this architecture also allows for easy addition or modification of content without compromising performance or modifying any code.

To add more content, we can simply create new MDX files in the content directory, following the existing structure. The blog is designed to be scalable, maintainable, and extensible, making it a great platform for sharing knowledge and insights within the tech community.

Feel free to contribute your own articles, improve the existing content, or customize the blog to suit your needs. Let's build a vibrant community around computer science and software engineering! Refer to the Contributing section for guidelines on how to contribute to this project.

Live Application

The blog is deployed on Vercel and can be accessed at https://devverse-swe.vercel.app/.

The backup deployment is available on Netlify at https://devverse-swe.netlify.app.

Feel free to explore the content and features of the blog! πŸš€

Home Page

Home Page

Article Page

Article Page

Dark Mode

Dark Mode

Features

  • Next.js Framework: Built with Next.js for robust SSR, SSG, and CSR.
  • MDX Integration: Write content in MDX, mixing Markdown with React components.
  • Progressive Web App (PWA): Enhanced offline capabilities with next-pwa.
  • Animation: Smooth animations with Framer Motion.
  • Mathematics Rendering: Render mathematical equations using KaTeX, rehype-katex, and remark-math.
  • Code Splitting & Performance: Automatic code splitting and image optimization for improved performance.
  • Containerized Development: Docker and Docker Compose configurations for an isolated development environment.
  • Dev Containers: VS Code Dev Container configuration for a seamless setup.

Project Structure

devverse-cs-swe-blog/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ globals.css         # Global CSS styles
β”‚   β”œβ”€β”€ page.tsx            # Main page component
β”‚   β”œβ”€β”€ layout.tsx          # Layout component
β”‚   └── topics/[slug]
β”‚       └── page.tsx        # Dynamic topic pages
β”œβ”€β”€ components/             # Reusable React components
β”‚   β”œβ”€β”€ ArticleList.tsx     # Component for displaying a list of articles
β”‚   β”œβ”€β”€ Footer.tsx          # Footer component
β”‚   β”œβ”€β”€ HomePageContent.tsx # Home page content component
β”‚   β”œβ”€β”€ Navbar.tsx          # Navbar component
β”‚   β”œβ”€β”€ InteractiveCard.tsx # Interactive card component
β”‚   β”œβ”€β”€ Loading.tsx         # Loading spinner component
β”‚   β”œβ”€β”€ MdxLayout.tsx       # Layout component for MDX content
β”‚   └── RouteProgress.tsx   # Route progress bar component
β”œβ”€β”€ public/                 # Static files (images, fonts, etc.)
β”œβ”€β”€ content/                # MDX content for blog posts
β”œβ”€β”€ .devcontainer/          # VS Code Dev Container configuration
β”‚   └── devcontainer.json
β”œβ”€β”€ images/                 # Images for README
β”œβ”€β”€ Dockerfile              # Docker image configuration for the app
β”œβ”€β”€ docker-compose.yml      # Docker Compose file for containerized development
β”œβ”€β”€ package.json            # Project manifest with scripts and dependencies
β”œβ”€β”€ tsconfig.json           # TypeScript configuration
β”œβ”€β”€ next.config.js          # Next.js configuration
β”œβ”€β”€ mdx-components.tsx      # Custom MDX components
β”œβ”€β”€ tailwind.config.js      # Tailwind CSS configuration
└── README.md               # This documentation file

Prerequisites

Getting Started

Local Development

  1. Clone the Repository:

    git clone https://github.com/hoangsonww/DevVerse-SWE-Blog.git
    cd DevVerse-CS-SWE-Blog
  2. Install Dependencies:

    npm install
  3. Run the Development Server:

    npm run dev

    Open http://localhost:3000 in your browser to view the app.

Docker & Docker Compose

A docker-compose.yml file is provided to facilitate containerized development.

  1. Build and Start the Container:

    docker-compose up
  2. Access the App:

    The application will be available at http://localhost:3000.

Using VS Code Dev Containers

If you use Visual Studio Code, you can open the project in a Dev Container:

  1. Install the Remote - Containers extension.
  2. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and select "Remote-Containers: Reopen in Container".
  3. VS Code will build and attach to the container using the configuration in .devcontainer/devcontainer.json.

Available Scripts

  • npm run dev
    Runs the Next.js development server.

  • npm run build
    Builds the application for production.

  • npm run start
    Starts the production server.

Dependencies

  • Next.js: The core framework powering the application.
  • React & React-Dom: Essential libraries for building user interfaces.
  • @mdx-js/loader & @mdx-js/react: Tools for integrating MDX content with React.
  • next-pwa: Adds progressive web app capabilities.
  • Framer Motion: Provides smooth animations.
  • KaTeX, rehype-katex, remark-math: Enable mathematical rendering within MDX content.
  • nprogress: A progress bar for route transitions.
  • remark-gfm: Adds support for GitHub Flavored Markdown.

Dev Dependencies

  • TypeScript & @types/node: Enable static typing for robust development.
  • @types/nprogress: Provides type definitions for nprogress.

Docker & Dev Container Configuration

Dockerfile

FROM node:18-bullseye-slim
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "run", "dev"]

docker-compose.yml

version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    volumes:
      - .:/app:cached
    command: npm run dev
    environment:
      - NODE_ENV=development

.devcontainer/devcontainer.json

{
  "name": "devverse-cs-swe-blog",
  "build": {
    "dockerfile": "Dockerfile",
    "context": ".."
  },
  "settings": {
    "terminal.integrated.shell.linux": "/bin/bash",
    "editor.formatOnSave": true
  },
  "extensions": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "ms-vscode.vscode-typescript-next",
    "eamodio.gitlens"
  ],
  "postCreateCommand": "npm install",
  "remoteUser": "node",
  "forwardPorts": [3000]
}

Contributing

Contributions are welcome! Please follow these guidelines when contributing:

  1. Fork the repository and create your feature branch (git checkout -b feature/your-feature).
  2. Commit your changes (git commit -m 'Add some feature').
  3. Push your branch (git push origin feature/your-feature).
  4. Open a pull request with a detailed description of your changes.

Ensure that your code adheres to our coding standards and includes tests where applicable.

Add more MDX content

To add more MDX content, create a new .mdx file in the content directory. You can use the existing files as a template.

We welcome contributions that expand the content and cover a wide range of topics in computer science and software engineering! I hope this project can serve as a platform for sharing knowledge and insights within the tech community.

License

This project is licensed under the MIT License.

Further Reading and Resources

Reach out to me at @hoangsonww for any questions or feedback. I'd love to hear from you!


This project is powered by Next.js and serves as a testament to the framework's capabilities in building modern, scalable, and high-performance web applications. Happy coding! πŸš€

About

πŸͺ DevVerse CS Blog – A modern, high-performance blog built with Next.js, Vercel, TypeScript, MDX, and Framer Motion, featuring real-time search, dynamic routing, and optimized SEO for deep dives into computer science and software engineering topics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages