{"id":21604486,"url":"https://github.com/ivanms1/project-shelf","last_synced_at":"2025-04-11T03:02:03.692Z","repository":{"id":37935419,"uuid":"403062289","full_name":"ivanms1/project-shelf","owner":"ivanms1","description":"A showcase app for your projects","archived":false,"fork":false,"pushed_at":"2023-12-01T03:32:33.000Z","size":6124,"stargazers_count":10,"open_issues_count":9,"forks_count":2,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-03-25T00:42:31.357Z","etag":null,"topics":["apollo","graphql","hacktoberfest","nextjs","pothos","prisma","react","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://www.projectshelf.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanms1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2021-09-04T13:23:10.000Z","updated_at":"2024-03-04T17:48:29.000Z","dependencies_parsed_at":"2023-09-24T07:04:39.848Z","dependency_job_id":null,"html_url":"https://github.com/ivanms1/project-shelf","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fproject-shelf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fproject-shelf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fproject-shelf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fproject-shelf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanms1","download_url":"https://codeload.github.com/ivanms1/project-shelf/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333605,"owners_count":21086199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apollo","graphql","hacktoberfest","nextjs","pothos","prisma","react","tailwindcss","typescript"],"created_at":"2024-11-24T19:23:03.648Z","updated_at":"2025-04-11T03:02:03.671Z","avatar_url":"https://github.com/ivanms1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Shelf\n\n## Description\n\nProject Shelf aims to give a space for developers to showcase their projects, get feedback and connect with other developers.\n\n## Technology stack\n\n- Backend: [Node.js](https://nodejs.org/en/), [Pothos GraphQL](https://pothos-graphql.dev/), [Prisma](https://www.prisma.io/) and [Apollo Server](https://www.apollographql.com/docs/apollo-server/#:~:text=Apollo%20Server%20is%20an%20open,use%20data%20from%20any%20source.)\n- Frontend: [React.js](https://reactjs.org/), [Next.js](https://nextjs.org/) and [Apollo Client](https://www.apollographql.com/docs/react/)\n\n## Monorepo Setup\n\nThis monorepo contains\n\n- `apps/api`: [Node.js](https://nodejs.org/en/) app, provides all the apis and connects to the database.\n- `apps/web`: Main app powered by [Next.js](https://nextjs.org)\n- `apps/admin`: [Next.js](https://nextjs.org) app for admin purposes\n- `packages/ui`: Internal component library used by both `web` and `admin` applications\n- `packages/apollo-hooks`: Libary of apollo-graphql hooks generated by [GraphQL Code Generator](https://www.graphql-code-generator.com/) for `web` and `admin` app to consume\n\n## Requirements\n\n- ### General\n\n  - **Yarn**\n\n  This repository uses [Yarn](https://classic.yarnpkg.com/lang/en/) as a package manager.\n\n- ### Backend\n\n  - **PostgreSQL Database**\n\n    To run the backend, a connection to a database is needed. The easiest way to run a Postgres DB locally is via [Docker](https://www.docker.com/).\n\n    Once you have Docker installed run this command:\n\n    ```\n    docker run --detach --publish 5432:5432 -e POSTGRES_PASSWORD=postgres --name project-shelf postgres:10.12\n    ```\n\n    Another alternative is running a PostgreSQL DB in the cloud with services like [fly.io](https://fly.io/) wich have a a free tier.\n\n  - **Cloudinary**\n\n    All the images are saved in [Cloudinary](https://cloudinary.com/), the free tier is more than enough for development.\n\n  - **Enviroment Variables**\n\n    Inside the `apps/api` directory\n\n    ```\n    DATABASE_URL=\"database url, if running with docker it would be: postgresql://postgres:postgres@localhost:5432/project-shelf\"\n    CLOUDINARY_URL=\"Your Cloudinary key goes here\"\n    JWT_SECRET=\"Any random string, only for development\"\n    SERVER_URL=\"http://localhost\"\n    ```\n\n- ### Frontend\n\n  - **Github OAuth**\n    Github is being used as an auth provider, you will need to [create an OAuth](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) app on your github account with these settings:\n\n    ![](https://res.cloudinary.com/ivanms1/image/upload/v1644078662/Screen_Shot_2022-02-06_at_1.28.01_AM_aa0u5l.png)\n\n  - **Enviroment Variables**\n\n    Inside the `apps/web` and `apps/admin` directories\n\n    ```\n    GITHUB_CLIENT_ID=\"your oatuh github client id\"\n    GITHUB_CLIENT_SECRET=\"your oatuh github client secret\"\n    JWT_SECRET=\"some random string, only for development\"\n    NEXTAUTH_URL=\"http://localhost:3000\"\n    NEXT_PUBLIC_SERVER_URL=\"http://localhost:8080/graphql\"\n    NEXT_PUBLIC_CLOUD_NAME=\"cloudinary id\"\n    ```\n\n## Running the app\n\n- ### General\n\n  - Build the hooks library\n    ```\n    yarn build:hooks\n    ```\n  - Install all dependencies, on the root folder run\n\n    ```\n    yarn install\n    ```\n\n- ### Backend\n\n  #### Only when running the app for the first time\n\n  - Make sure you cd into the project-shelf/apps/api directory\n  - Generate data source client code with prisma\n\n  ```\n  npx prisma generate\n  ```\n\n  - Initialize Database\n\n  ```\n  npx prisma migrate dev\n  ```\n\n  #### After\n\n  - Run app\n\n  ```\n  yarn dev:api\n  ```\n\n- ### Frontend\n\n  - Start the app\n\n    ```\n    yarn dev:web\n    ```\n\n  - (optional) inside the apps/web, use the `yarn generate` cli command to generate templates for pages and components.\n\n## After changing schema\n\n- To update the schema on the frontend\n  `yarn generate:hooks`\n  `yarn build:hooks`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanms1%2Fproject-shelf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanms1%2Fproject-shelf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanms1%2Fproject-shelf/lists"}