Samuel Edusa MD

< Back to list of posts

Building the Azalea Report: A Next.js Newsletter with Decap CMS

vscode Screenshot showing code from code editor

As the developer behind the Azalea Report, SGMC Health's Internal Medicine Residency Newsletter, I wanted to share the process of creating this dynamic and easily maintainable web application. Here's how I built it using Next.js and Decap CMS, leveraging the power of modern development tools and AI.

Project Overview

The Azalea Report is a digital newsletter designed to showcase the achievements, events, and community of the SGMC Health Internal Medicine Residency program. My goals were to create a visually appealing, responsive design that could be easily updated by non-technical staff.

Tech Stack

I chose the following technologies:

  • Next.js: For its powerful React framework and static site generation capabilities.
  • Github: For hosting the project (link to the repository can be found here)
  • Decap CMS: To provide a user-friendly content management system.
  • CSS Modules: For scoped, maintainable styling.
  • Netlify: For seamless deployment and hosting.

Weekend Project and LLM Integration

I built this project over a weekend, which is a testament to how Large Language Models (LLMs) are revolutionizing software development productivity. By leveraging VSCode's integration with several LLMs, I was able to significantly accelerate my development process. This experience truly highlights how LLMs are changing the landscape of software development, enabling developers to tackle complex projects in shorter timeframes.

Setting Up the Project

  1. Initialize the Next.js project: I started by creating a new Next.js project and installing necessary dependencies.
  2. Configure Decap CMS: I set up the public/admin folder with the necessary HTML and configuration files to integrate Decap CMS.
  3. Create content models: In public/admin/config.yml, I defined the structure for our content, including sections like resident spotlights, upcoming events, and program statistics.
  4. Develop the main page: I created pages/index.js to serve as our homepage, pulling in content from our Markdown files.
  5. Style the application: Using CSS Modules styles/Home.module.css, I created a responsive, visually appealing layout.
  6. Optimize for performance: I configured next.config.js for static site generation and image optimization.

Key Features

  1. Dynamic Content Sections: The homepage dynamically renders various sections like "Resident Spotlight", "Chat With Our Chiefs", and "Things to Do in Valdosta" based on the content in our Markdown files.
  2. Responsive Design: I implemented a mobile-first approach, ensuring the newsletter looks great on devices of all sizes.
  3. Image Carousel: For the "Photos of the Month" section, I created a simple image carousel to showcase multiple images.
  4. Easy Content Management: Non-technical staff can easily update content through the Decap CMS interface.

Challenges and Solutions

  1. Image Handling: To optimize performance, I used Next.js's Image component and configured it for static exports.
  2. Content Structure: I carefully designed the content model in Decap CMS to balance flexibility with ease of use for content editors.
  3. Responsive Layout: I used CSS Grid and Flexbox, along with media queries, to create a layout that adapts seamlessly to different screen sizes.

Conclusion

Building the Azalea Report was an exciting project that combined modern web technologies with user-friendly content management. The result is a dynamic, easily maintainable newsletter that serves as a vibrant hub for the SGMC Health Internal Medicine Residency community.

The domain for this project was purchased using Namecheap, completing the full cycle from development to deployment.

I look forward to seeing how the Azalea Report grows and evolves in the future, and I'm excited about the continued impact of LLMs on software development practices.