Giter Site home page Giter Site logo

todo-app's Introduction

ToDo Application with GraphQL, Apollo, Prisma, HotChocolate, Entity Framework, React.js, Redux, and Apollo Client

This repository contains a ToDo application that demonstrates the usage of GraphQL servers implemented using Apollo and Prisma in Node.js, as well as HotChocolate and Entity Framework in .NET Core. The client is built using React.js, utilizing Redux for state management and Apollo Client for making GraphQL API calls.

Features

  • Create, read, update, and delete ToDo items.
  • Real-time updates using GraphQL subscriptions.
  • Server-side logic implemented using Apollo Server (Node.js) and HotChocolate (.NET Core).
  • Persistent storage using Prisma (Node.js) and Entity Framework (.NET Core).
  • Client-side state management using Redux.
  • GraphQL API calls from the client using Apollo Client.

Prerequisites

  • Node.js and npm (for Node.js based server)
  • .NET Core SDK (for .NET Core based server)
  • Visual Studio Code or any preferred code editor

Getting Started

Server (Node.js with Apollo and Prisma)

  1. Navigate to the server-node directory.
  2. Install dependencies using npm install.
  3. Configure your database connection in the .env file.
  4. Run database migrations using npx prisma migrate dev.
  5. Start the Apollo Server using npm start.

Server (.NET Core with HotChocolate and Entity Framework)

  1. Open the server-dotnet directory in Visual Studio or your preferred .NET Core IDE.
  2. Configure your database connection in the appsettings.json file.
  3. Build and run the .NET Core server.

Client (React.js with Redux and Apollo Client)

  1. Navigate to the client-react directory.
  2. Install dependencies using npm install.
  3. Update the Apollo Client configuration in src/apollo.js to point to your server URLs.
  4. Start the React development server using npm start.

Usage

  • Open your browser and navigate to the React app (by default, it runs on http://localhost:3000).
  • You'll see a list of ToDo items fetched from the GraphQL server.
  • Use the UI to add, update, or delete ToDo items.
  • Changes are updated in real-time thanks to GraphQL subscriptions.

Folder Structure

  • server-node: Node.js based GraphQL server with Apollo Server and Prisma.
  • server-dotnet: .NET Core based GraphQL server with HotChocolate and Entity Framework.
  • client-react: React.js based client with Redux for state management and Apollo Client for GraphQL API calls.

Contributions

Contributions to this example application are welcome! Feel free to fork this repository, make improvements, and submit pull requests.

License

This project is licensed under the MIT License.


Feel free to modify and extend this README.md as needed for your project. Make sure to adjust file paths, dependencies, and other details according to your project's structure and requirements.

todo-app's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.