Evavic44 / rocketmeme

⚑ A multipurpose meme marketplace and editor for creating, downloading and sharing memes with a ready to use API powered by Hasura GraphQL
https://rocketmeme.netlify.app/create
MIT License
39 stars 7 forks source link
framer-motion hackathon hacktoberfest hasura hasura-graphql javascript meme-api meme-generator memes nodejs react reactjs styled-components utterances vitejs

Rocketmeme

A multipurpose meme marketplace and editor for creating and downloading memes. View meme collection, browse different meme categories, like share and save memes.

code style: prettier



Rocketmeme - Create, share & download memes or use our powerful API | Product Hunt

πŸ‘€ Preview

Click this link to view rocketmeme

Rocketmeme Preview

How to run locally ✨

Follow these steps below to run rocketmeme locally in your machine. We are using vite.js to bootstrap this application. You can read their docs for more info.

🧩 Prerequisites

In other to run our react app, make sure you have the following installed locally.

Clone this repository

Clone this repository to your local machine.

git clone https://github.com/Evavic44/rocketmeme.git

Cd client

Change directory into the client folder. This is where the frontend code lives.

cd client

Install NPM

npm install

Run

Run the development server to view the app.

npm run dev

Now you can navigate to http://localhost:3000 to view the app.

Adittional Commands ✨

Build

npm run build

This is a preview of your dev server.

Serve

npm run serve

This is a preview of your build

Rocketmeme API

/* API Endpoint */
https://rocketmeme-user.hasura.app/v1/graphql

With Hasura, we were able to create a serverless API using Hasura cloud. The API exists for two types of requests: The meme template and the uploaded memes. If you're interested, you can start exploring the API docs to get an idea of everything possible with the rocketmeme API.πŸ’›

API Docs

async function fetchGraphQL(operationsDoc, operationName, variables) {
  const result = await fetch(
    "undefined",
    {
      method: "POST",
      body: JSON.stringify({
        query: operationsDoc,
        variables: variables,
        operationName: operationName
      })
    }
  );

  return await result.json();
}

const operationsDoc = `
  query MyQuery {
    meme_templates(order_by: {id: asc, image_link: asc, title: asc}) {
      id
      image_link
      title
    }
  }
`;

function fetchMyQuery() {
  return fetchGraphQL(
    operationsDoc,
    "MyQuery",
    {}
  );
}

async function startFetchMyQuery() {
  const { errors, data } = await fetchMyQuery();

  if (errors) {
    // handle those errors like a pro
    console.error(errors);
  }

  // do something great with this precious data
  console.log(data);
}

startFetchMyQuery();

🎨 Styling

Styling is done using styled-components and css3

Style Guide A preview of the style guide.

🀝🏾 Contribution

Are you contributing to this project, please ensure all pull requests and contributions comply with our guidelines. Before making any changes, ensure you have raised an issue here, unless it is a minimal change.

πŸ“ Folder Structure

β”œβ”€β”€ client
β”‚   β”œβ”€β”€ public
β”‚   β”‚   β”œβ”€β”€ images
β”‚   β”‚   β”‚   β”œβ”€β”€ ../
β”‚   β”‚   β”œβ”€β”€ Robots.txt
β”‚   β”‚   β”œβ”€β”€ _redirects
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ Components
β”‚   β”‚   β”‚   β”œβ”€β”€ ../
β”‚   β”‚   β”œβ”€β”€ pages
β”‚   β”‚   β”‚   β”œβ”€β”€ ../
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   β”œβ”€β”€ main.jsx
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ controllers
β”‚   β”œβ”€β”€ middlewares
β”‚   β”œβ”€β”€ models
β”‚   β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ services
β”‚   β”œβ”€β”€ utils
β”‚   β”œβ”€β”€ index.js
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .gitpod.yml8
β”œβ”€β”€ CODE_OF_CONDUCT.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ package.json

This structure is completely flexible and bound to change. Updates to this tree is done manually till we find a suitable generator 😿

πŸ” License

This project is protected by MIT License.

πŸ’΅ Sponsor

Consider supporting us buy buying us a coffee or two. We appreciate every donation.

bmc-button

If you like this project, kindly star ⭐ and share this project. It means the world to us.

Contributors ✨

All Contributors

Thanks goes to these wonderful people (emoji key):


Spiff Jekey-Green

πŸ› πŸ’» πŸ€” πŸ‘€

Ugorji Miracle

πŸ’» 🎨 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!