Social Climate Tech

Sun 01 2024
Image

Building a Sustainable, Scalable, and Flexible Web Platform with Python

by bernt & torsten

When we set out to build SCT Pulse, we had one mission: to create a platform to support our entire organization while staying true to our core values of sustainability, social impact, and technological innovation. SCT Pulse is not just another blog platform - it’s a comprehensive organizational portal that combines all the essential tools and systems into one powerful solution. From HR and finance to marketing and fundraising, SCT Pulse is the heart of Social Climate Tech’s digital operations, enabling us to work efficiently and sustainably.

At Social Climate Tech, we knew that every technology choice would have lasting impacts - not just on the usability of our platform but on its sustainability, scalability, and overall environmental footprint. We needed to evaluate all potential technologies and make informed decisions aligned with our vision for a more sustainable future. After thoroughly assessing existing platforms, hosting services, and technological frameworks, we concluded that the best path forward was to build our platform tailored to our needs and built with sustainability in mind.

Introducing SCT Pulse: A Sustainable Organizational Solution

Many organizations rely on many services to manage their operations, whether using multiple SaaS tools or hosting open-source applications on their own hardware. However, this approach can be far from sustainable. Each additional service adds to energy consumption, increases server farm usage, and introduces inefficiencies due to the need for constant API calls and data synchronization. 

By consolidating everything into SCT Pulse, we’ve reduced the number of separate services our organization depends on. This not only cuts down on resource usage but also simplifies our infrastructure, making it easier to manage and scale. With SCT Pulse, we’ve brought everything under one roof, creating a more sustainable solution that doesn’t compromise on functionality.

Technology Choices: A Thoughtful Journey

Choosing the right technology for SCT Pulse requires a long and rigorous evaluation of various programming languages, platforms, and hosting services. We carefully weighed every option against cost, server farm usage, sustainability, and long-term viability. Our goal was to create a solution that would meet the demands of modern web applications and align with our commitment to reducing our environmental impact.

Why Python?

Yes, we chose Python - perhaps not the first language that comes to mind when considering sustainability. However, Python stood out for its flexibility, its extensive ecosystem of libraries, and the strong community support that comes with it. While Python might have a slightly higher energy footprint than other languages, we offset this using serverless technology. This means that when SCT Pulse isn’t experiencing traffic, the servers automatically go to sleep, minimizing unnecessary resource consumption and reducing our overall environmental footprint.

Building SCT Pulse with Python Flask

We chose Python’s Flask framework as the foundation for SCT Pulse. Flask provided the perfect balance between simplicity and power, allowing us to build robust API endpoints while maintaining the flexibility to adapt. One of our critical decisions was to use Jinja templates for server-side rendering. By rendering pages directly within the Flask framework, we minimized the number of API calls required to load a page, reducing latency and the associated environmental impact.

Sustainability at the Core of SCT Pulse

Sustainability was at the heart of every decision we made when building SCT Pulse. Our commitment to minimizing our environmental footprint guided us to implement several strategies:

  • Minimalist CSS Framework: We carefully selected a lightweight CSS framework that reduces the load on our servers and improves page load times, contributing to a more energy-efficient platform.
  • Local JavaScript Libraries: Instead of relying on external content delivery networks (CDNs), which can be less sustainable in the long run, we included all necessary JavaScript libraries locally within our codebase. This approach improved sustainability and enhanced performance by reducing external dependencies.
  • Cloudflare Protection: To enhance security while maintaining performance, we protected our site with Cloudflare, which helps us optimize resources and reduce our environmental impact.

Leveraging AI for Efficiency and Sustainability

AI is undeniably powerful, but it comes with significant sustainability concerns. Large, general-purpose AI models often require vast computational resources, resulting in a considerable environmental footprint. We recognize these challenges in creating SCT Pulse, so we've taken a different, more sustainable approach to AI by focusing on domain-specific models.

Rather than relying on massive AI systems, we develop smaller, tailored models specific to our organizational needs. These domain-specific models are more sustainable due to their reduced size and lower computational demands. By narrowing the scope of the AI to focus on the tasks and knowledge unique to our operations, we significantly reduce the resources needed for training and inference. This allows us to perform AI-driven tasks more efficiently, completing queries quicker and with a much smaller environmental impact.

Here’s how our domain-specific AI models contribute to various functions within SCT Pulse:

  • CRM Features: AI assists in managing customer relationships by delivering targeted insights and automating repetitive tasks in a more efficient and eco-friendly manner.
  • HR Functions: AI automates resume screening, job post creation, and candidate searches, completing these tasks quickly and effectively without resource-intensive models.
  • Marketing: AI supports SEO optimization, language translation, spell-checking, plagiarism checking, and content suggestions, making it easier for our content creators to produce high-quality materials sustainably.
  • Content Creation: Our AI models help generate content ideas and automate writing tasks, reducing our team's workload while ensuring that our blog content remains relevant and engaging.
  • Knowledge Base: We’ve implemented an AI-driven knowledge base as an internal portal. Using domain-specific models trained on our internal data, we deliver intelligent, context-aware responses quickly and with minimal environmental impact.

Focusing on domain-specific AI ensures that SCT Pulse remains at the cutting edge of innovation while aligning with our commitment to sustainability. This approach allows us to harness AI's benefits without the significant ecological costs associated with large, generalized models. Essentially, we're making AI work smarter, not harder, for a more sustainable future.

Powered by Google Cloud Platform (GCP)

To ensure that SCT Pulse is scalable, flexible, and sustainable, we chose to host our platform on Google Cloud Platform (GCP). GCP offers a comprehensive range of services that allow us to manage and scale our operations while minimizing resource consumption efficiently. Here are some of the critical services we use:

  • Cloud Run: This hosts our web application in a serverless environment.
  • Cloud Functions: These handle backend processes like link searching for our brand and other automated tasks.
  • Cloud Build: To automate our continuous integration and deployment (CI/CD) pipeline, ensuring smooth and efficient updates.
  • Cloud Scheduler: This is for scheduling and automating tasks to reduce manual interventions and optimize resource usage.
  • Cloud Source Repositories: These are used to maintain our source code securely.
  • BigQuery & Looker Studio: This is for advanced analytics and reporting, enabling us to make data-driven decisions while optimizing our operations for sustainability.
  • Firestore & Cloud Storage: This is for managing content and image storage in a scalable, sustainable way.
  • Secret Manager & Artifact Registry: This securely handles application secrets and Docker containers and ensures our infrastructure remains secure and efficient.

Progressive Web App (PWA)

SCT Pulse is also built as a Progressive Web App (PWA), ensuring that our platform is accessible and performs well across all screens and devices. By developing SCT Pulse as a PWA, we’ve future-proofed our platform, making it adaptable to the ever-evolving digital landscape while focusing on sustainability and user experience.

A Comprehensive Portal for Our Organization

SCT Pulse is more than just a blog platform; it’s a full-fledged organizational portal that powers the internal operations of Social Climate Tech. Employees can log in to access various backend systems, including HR, finance, internal communication, fundraising and marketing. Our marketing tools are particularly robust, featuring content management, analytics, campaign tracking, brand monitoring, and even a pixel counter for campaign work similar to Facebook’s tracking pixel. This consolidation of tools into a single platform not only streamlines operations but also reduces our reliance on multiple external services, making our overall infrastructure more sustainable.

Conclusion

With SCT Pulse, we’ve built a platform that is scalable, flexible, and deeply rooted in our commitment to sustainability. By making thoughtful technology choices- using Python, Flask, and serverless infrastructure - we’ve created a powerful digital solution that minimizes environmental impact while maximizing efficiency. SCT Pulse represents the future of sustainable technology, proving that it’s possible to build robust, feature-rich platforms without compromising on our environmental responsibilities.

Stay tuned for future articles, in which we’ll explore the specific features and decisions that make SCT Pulse a standout platform in the world of sustainable technology.

Share: