Skip to content

muthuri-dev/codelabs-client

Repository files navigation

Codelabs

blackbg

GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. DataFlow
  5. Contributing
  6. License
  7. Acknowledgments

Introduction

This project is a web application for tech enthusiasts, offering course uploads from instructors, a community space for interaction, and a dedicated discussion forum to learn, connect, and share knowledge in the ever-evolving tech landscape.

yourhub-mockup dashboard

Features

Codelabs comes with a wide range of features tailored for horse care:

  • Learning platform: Get to learn from community experts.
  • Course uploads: Upload course in your are of expertise in form of writing.
  • Tech discussions: Get engauged in tech related discussions and also start one.
  • Chat features: Communication made easy for community members to reach everyone.
  • Integrate other apps: Intergrate other apps to the site.
  • Community: Connect with fellow tech enthusiasts and share your expertise.

Installation

To start using Equine Tracker, follow these installation steps:

  1. Fork and Clone the repository:

    fork the repo
    
    git clone https://github.com/muthuri-dev/codelabs-client
  2. Navigate to the project directory:

    cd codelabs-client
  3. Install the required dependencies:

    npm install
  4. Start the application:

    npm run start:dev

    5.Create .env file and add:

  DATABASE_URL
  KINDE_CLIENT_ID
  KINDE_CLIENT_SECRET
  KINDE_ISSUER_URL
  KINDE_SITE_URL
  KINDE_POST_LOGOUT_REDIRECT_URL
  KINDE_POST_LOGIN_REDIRECT_URL

  UPLOADTHING_SECRET
  UPLOADTHING_APP_ID

DataFlow

The application uses different microservices(subgraphs) connected together with graphql federation 2 gateway which connects with frontend.Each microservice uses different database

aanew

Api gateway

It uses Apollo gateway to connect all the services.

    @Module({
  imports: [
    GraphQLModule.forRoot<ApolloGatewayDriverConfig>({
      driver: ApolloGatewayDriver,
      gateway: {
        supergraphSdl: new IntrospectAndCompose({
          subgraphs: [
            {
              name: 'users',
              url: 'https://codelabs-users-service...',
            },
            {
              name: 'courses',
              url: 'https://codelabs-courses-service...',
            },
            {
              name: 'discussions',
              url: 'https://codelabs-discussions-service...',
            },
            {
              name: 'other-services',
              url: 'https://codelabs-other-service...',
            },
          ],
        }),
      },
      server: {
        playground: true,
        introspection: true,
      },
    }),
  ],
  controllers: [],
  providers: [],
})
export class AppModule {}

Api gateway source code

https://github.com/muthuri-dev/codelabs-api-gateway

Connecting to the api-gateway in next js

"use client";
import React from "react";
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";

export default function Provider({ children }: { children: React.ReactNode }) {
  const client = new ApolloClient({
    uri: "https://codelabs-api-gateway.up.railway.app/graphql",
    cache: new InMemoryCache(),
  });
  return <ApolloProvider client={client}>{children}</ApolloProvider>;
}

Contributing

We welcome contributions from the community! If you have ideas for improvements, bug reports, or want to contribute code, please check our Contribution Guidelines for details on how to get involved.

License

Equine Tracker is open-source software licensed under the Apache License 2.0. For full details, refer to the LICENSE file.

Acknowledgments

We'd like to extend our gratitude to the equestrian community for their support and inspiration.

Thank you for choosing codelabs!