{"id":21604547,"url":"https://github.com/ivanms1/daepa","last_synced_at":"2025-03-18T14:10:10.734Z","repository":{"id":45802849,"uuid":"512382834","full_name":"ivanms1/daepa","owner":"ivanms1","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-01T08:33:06.000Z","size":1243,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T18:49:10.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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":null,"security":null,"support":null}},"created_at":"2022-07-10T08:26:28.000Z","updated_at":"2022-07-11T08:00:36.000Z","dependencies_parsed_at":"2023-02-17T03:15:28.380Z","dependency_job_id":null,"html_url":"https://github.com/ivanms1/daepa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"ivanms1/turbo-pothos-prisma-nextjs-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fdaepa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fdaepa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fdaepa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanms1%2Fdaepa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanms1","download_url":"https://codeload.github.com/ivanms1/daepa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244236079,"owners_count":20420759,"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":[],"created_at":"2024-11-24T19:23:27.900Z","updated_at":"2025-03-18T14:10:10.710Z","avatar_url":"https://github.com/ivanms1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turborepo + Nexus + Prisma + Next Template\n\n## Technology stack\n\n- Backend: [Node.js](https://nodejs.org/en/), [GraphQL Nexus](https://nexusjs.org/), [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\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 daepa postgres:10.12\n    ```\n\n    Another alternative is running a PostgreSQL DB in the cloud with services like [fly.io](https://fly.io/) or [Heroku](https://dashboard.heroku.com) 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanms1%2Fdaepa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanms1%2Fdaepa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanms1%2Fdaepa/lists"}