Giter Site home page Giter Site logo

socialmedia_backend's Introduction

Social Media Backend Build Using Graphql,Redis etc.

Overview of the Application

image

This is the README file for the Social Media Backend project, which includes a Docker Compose configuration and a Node.js application. The project utilizes Docker to set up a PostgreSQL database and a Redis server for development purposes. Additionally, it is built with TypeScript and utilizes popular GraphQL and Prisma libraries to create a GraphQL API server.

Prerequisites

Before getting started, ensure you have the following software installed on your system:

Getting Started

Using Gitpod

You can also run this project in a Gitpod workspace, which provides a development environment in the cloud. Click the link below to open this repository in a Gitpod workspace:

Open in Gitpod

1. Clone the Repository

Clone this repository to your local machine:

git clone https://github.com/AbhishekCS3459/GraphQl_Nodejs_Backend
cd Social Media Backend

2. Docker Compose Setup

The project includes a docker-compose.yml file that defines two services: PostgreSQL and Redis. To set up these services, run the following command in the project root directory:

docker-compose up -d

This command will create and start containers for PostgreSQL and Redis. You can access PostgreSQL on port 5432 and Redis on port 6379.

3. Install Node.js Dependencies

Next, you need to install the Node.js dependencies for the GraphQL server. Run the following command in the project root directory:

npm install

4. Prisma Setup

This project uses Prisma for database management. Before you can run the GraphQL server, you need to generate the Prisma client. Use the following command:

npx prisma generate

5. Start the GraphQL Server

You can start the GraphQL server with the following command:

npm run dev

The server will be available at http://localhost:8000/graphql.

6. Using the GraphQL API

You can now use your GraphQL API to interact with the database. Open a GraphQL client, like Apollo Studio, and start sending queries and mutations.

Project Structure

  • docker-compose.yml: Defines the Docker services for PostgreSQL and Redis.
  • package.json: Node.js project configuration file with dependencies and scripts.
  • src: Contains the source code for the GraphQL server.
  • prisma: Contains Prisma configuration and database schema.

License

This project is licensed under the MIT License. You can find the full license details in the LICENSE file.

Acknowledgments

  • This project is built with GraphQL, Prisma, and other open-source technologies.
  • Special thanks to the Docker community for making containerization easy.

Issues and Contributions

If you encounter any issues or have suggestions for improvements, please open an issue on this repository. Contributions and pull requests are welcome!

Enjoy using Social Media Backend for your GraphQL development and database management needs!

Additional Information

  • The GraphQL server will be accessible at http://localhost:4000 in your local environment.
  • The Prisma Client and database schema are set up for you to interact with the PostgreSQL database. You can modify the schema in the prisma/schema.prisma file.
  • Creating posts and other features will be soon included into this repo

socialmedia_backend's People

Contributors

abhishekcs3459 avatar

Stargazers

 avatar

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.