{"id":27128167,"url":"https://github.com/0xdeval/growthcast-proxy","last_synced_at":"2026-05-20T14:15:51.731Z","repository":{"id":253385868,"uuid":"793542684","full_name":"0xdeval/growthcast-proxy","owner":"0xdeval","description":"The repo of the Growthcast extension backend that provides different API endpoint to communicate with a custom Farcaster Hub","archived":false,"fork":false,"pushed_at":"2024-08-16T09:18:19.000Z","size":1491,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T07:40:40.616Z","etag":null,"topics":["analytics","backend-api","farcaster","neynar","warpcast","web3"],"latest_commit_sha":null,"homepage":"https://growthcast.xyz/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xdeval.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-29T12:22:43.000Z","updated_at":"2024-08-29T10:29:09.000Z","dependencies_parsed_at":"2024-08-16T11:56:05.819Z","dependency_job_id":null,"html_url":"https://github.com/0xdeval/growthcast-proxy","commit_stats":null,"previous_names":["maikreal/growthcast-proxy","0xdeval/growthcast-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xdeval/growthcast-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeval%2Fgrowthcast-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeval%2Fgrowthcast-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeval%2Fgrowthcast-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeval%2Fgrowthcast-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xdeval","download_url":"https://codeload.github.com/0xdeval/growthcast-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeval%2Fgrowthcast-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266618843,"owners_count":23957273,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["analytics","backend-api","farcaster","neynar","warpcast","web3"],"created_at":"2025-04-07T18:35:15.068Z","updated_at":"2026-05-20T14:15:46.698Z","avatar_url":"https://github.com/0xdeval.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Growthcast backend\n\nThis repo contains the backend part of the Growthcast extension. The current repo contains the following main components:\n\n- API endpoints to interact with the extension (more details about the API endpoints)\n- The sign-in page that can be used to login to a Farcaster account\n\nGrowthcast login page is available by the following path:\n\n```plaintext\nhttp://localhost:3000/signin\n```\n\n# Getting Started\n\nRequirements:\n\n1. Cloud or hardware server to:\n   - Running Farcaster node\n   - Running PostgreSQL database (14.12+)\n2. Neynar API key. It could be generated on https://neynar.com\n3. npm: 10.5.0+\n4. Next.js: 14.2.4+\n\n## Farcaster node\n\nTo run the backend you need to have the running Farcaster node. To get more details on how to launch your own Farcaster node, you can refer to [the following documentation](https://www.thehubble.xyz/intro/hubble.html)\n\nThe basic server setup to run the Farcaster node:\n\n- 16 GB of RAM\n- 4 CPU cores or vCPUs\n- 200 GB of free storage\n- A public IP address with ports 2282 - 2285 Exposed\n\n## PostgresSQL\n\nTo run the backend you also need to have a running PostgreSQL database. It could be on the same server or on a separate one\n\nThe requirement version is 14.12+\n\nThe database schema is described in the following section:\n\n## NeynarSDK\n\nFor simplicity, some of the endpoints use NeynarSDK to get Farcaster data. NeynarSDK also provides the login. If you don't want to use NeynarSDK, you need to re-write necessary endpoints to interact with Farcaster Node as well as re-write the login process without using the SDK\n\nTo get the Neynar API key, go to https://neynar.com and buy the subscription. The key is available in the dev portal: https://dev.neynar.com\n\n## Enviroment variables\n\nTo run the backend properly, you need to create a file with environment variables. You can use 2 different files for the development and production:\n\n- .env - for the production\n- .env.development - for the development\n\nThe more details about variables will be described in the table below:\n\n| Environment Variable                 | Description                             | Example Value                                                                                                                                                                                         |\n| ------------------------------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `NEXT_PUBLIC_NEYNAR_CLIENT_ID`       | Client ID for Neynar                    | `07082225-8b12-458f-b0ba-d5bf6f26a7e6`                                                                                                                                                                |\n| `NEXT_PUBLIC_NEYNAR_API_KEY`         | API Key for Neynar                      | `D2DD113E-6156-4837-B1F7-1AF7F410036E`                                                                                                                                                                |\n| `NEXT_PUBLIC_DOMAIN`                 | Domain for local development            | `http://localhost:3000`                                                                                                                                                                               |\n| `NEXT_PUBLIC_ENCRYPTION_KEY`         | Key used for encryption                 | `4ed2309caafc493d29432f16626163d8ff683de2522960e3765c3459777fce14`                                                                                                                                    |\n| `NEXT_PUBLIC_REFRESH_ENCRYPTION_KEY` | Key used for refreshing encryption      | `2qaBFBAJ2UDha0hntZG+5TN7SjKcsNLOGQUgDN+Lul0=`                                                                                                                                                        |\n| `NEXT_PUBLIC_IMGUR_CLIENT_ID`        | Imgur Client ID                         | `129b687c7b3f67b`                                                                                                                                                                                     |\n| `NEXT_PUBLIC_IMGUR_CLIENT_SECRET`    | Imgur Client Secret                     | `993b7160c7aad652783d1bf168c256603ac1f339`                                                                                                                                                            |\n| `NEXT_PUBLIC_WARPCAST_HOST`          | Host URL for Warpcast API               | `https://api.warpcast.com`                                                                                                                                                                            |\n| `NEXT_PUBLIC_OPENRANK_HOST`          | Host URL for OpenRank API               | `https://graph.cast.k3l.io`                                                                                                                                                                           |\n| `NEXT_PUBLIC_NEYNAR_HOST`            | Host URL for Neynar API                 | `https://api.neynar.com`                                                                                                                                                                              |\n| `NEXT_PUBLIC_DEV_MODE`               | Enable/Disable development mode         | `true`                                                                                                                                                                                                |\n| `SENTRY_AUTH_TOKEN`                  | Auth token for Sentry                   | `sntrys_eyJpOPQiOjE3MjAzNzQ4NTkuMTE3OTI1LCJ1cmwiOiJodHRwczovL3NlbnRyeS5pbyIsInJlZ2lvbl91cmwiOiJodHRwczovL2RlLnNlbnRyeS5pbyIsIm9yZyI6Imdyb3d0aGNhc3QifQ==_DHBTfO7HLAjPtK8E042ws39AJh8rJ4fD1lQ+7i2kcp8` |\n| `NEXT_PUBLIC_NODE_ADDRESS`           | Node address for Warp Drive             | `http://hub.warp-drive.xyz`                                                                                                                                                                           |\n| `POSTGRES_V2_URL`                    | PostgreSQL connection URL               | `postgres://manager:3bCaP3Axg1jnqQw6NERg@135.181.149.175/growthcast_dev`                                                                                                                              |\n| `POSTGRES_V2_URL_NON_POOLING`        | PostgreSQL connection URL (non-pooling) | `postgres://manager:3bCaP3Axg1jnqQw6NERg@135.181.149.175/growthcast_dev?sslmode=require`                                                                                                              |\n| `POSTGRES_V2_URL_NO_SSL`             | PostgreSQL connection URL (no SSL)      | `postgres://manager:3bCaP3Axg1jnqQw6NERg@135.181.149.175/growthcast_dev`                                                                                                                              |\n| `POSTGRES_V2_PRISMA_URL`             | PostgreSQL connection URL for Prisma    | `postgres://manager:3bCaP3Axg1jnqQw6NERg@135.181.149.175/growthcast_dev?pgbouncer=true\u0026connect_timeout=15\u0026sslmode=require`                                                                            |\n| `POSTGRES_V2_USER`                   | PostgreSQL user                         | `manager`                                                                                                                                                                                             |\n| `POSTGRES_V2_PASSWORD`               | PostgreSQL password                     | `3bCaP3Axg1jnqQw6NERg`                                                                                                                                                                                |\n| `POSTGRES_V2_HOST`                   | PostgreSQL host                         | `135.181.142.175`                                                                                                                                                                                     |\n| `POSTGRES_V2_DATABASE`               | PostgreSQL database name                | `growthcast_dev`                                                                                                                                                                                      |\n\n## Installation guide\n\nThe following steps should be completed before starting the further installation:\n\n- [x] Launch the server\n- [x] Run a Farcaster node\n- [x] Run a PostgreSQL database\n- [x] Create a file with environmental variables\n- [x] Create and add the Neynar API key to the .env / .env.development\n\nRight after all the steps above are completed, you can launch the backend!\n\n1. Install all necessary dependencies:\n\n   ```bash\n   npm install\n   ```\n\n2. Run the backend locally\n\n   ```bash\n   npm run dev\n   ```\n\n3. The backend API is available through http://localhost:3000/api. The sign-in is available at **http://localhost:3000/signin** URL\n\n## Deployment guide\n\n## Deploy on Vercel\n\nYou can deploy the backend in one click:\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/maikReal/growthcast-proxy)\n\nMake sure to add the environment variables for your Vercel project. Get more details about the envs on the following section:\n\nYou can also deploy the project to Vercel manually using the bash command:\n\n```bash\nvercel\n```\n\nMake sure that you've installed the Vercel with the ... version\n\n# Techincal details\n\nBelow there will describe some technical details about API, PostgreSQL, and Farcaster data processing\n\n## API endpoints\n\nThe API endpoints swagger is available by the following URL:\n\n```plaintext\nhttp://localhost:3000/api-doc\n```\n\n## PostgreSQL\n\nSeveral database tables are mainly used by the backend:\n\n- **users_casts_historical_data**\n  Stores pre-processed information about user's casts for the whole user's cast history\n- **users_info**\n  Stores the basic pre-processed data about a user and his activity on Farcaster\n\nAll tables will be automatically created during the first launch. The only thing that you need to do is to create the database that should have the \"growthcast\" name and \"growthcast_dev\" for the development database\n\n### Schemas\n\n**users_all_historical_data** table schema:\n\n```sql\nCREATE TABLE users_casts_historical_data (\n\tfid int4 NULL,\n\tcast_timestamp timestamp NULL,\n\tcast_text text NULL,\n\tcast_hash text NULL,\n\tcast_likes int4 NULL,\n\tcast_replies int4 NULL,\n\tcast_recasts int4 NULL,\n\trow_created_date timestamp NULL DEFAULT CURRENT_TIMESTAMP\n)\n```\n\n**users_info** table schema:\n\n```sql\nCREATE TABLE IF NOT EXISTS users_info (\n\tid SERIAL PRIMARY KEY,\n\tfid INTEGER NOT NULL,\n\tusername VARCHAR(255) NOT NULL,\n\tdisplay_name VARCHAR(255) NOT NULL,\n\tpfp_url TEXT,\n\tfollowers INTEGER DEFAULT 0,\n\tfollowings INTEGER DEFAULT 0,\n\tverified_address JSONB,\n\tis_data_fetched BOOLEAN DEFAULT FALSE,\n\trow_created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n\t)\n```\n\n## Data processing logic\n\nThe logic of the FarcasterDataProcessor and FarcasterReactionsDataProcessor is described on the schema below\n\n\u003e **TLDR:**\n\u003e\n\u003e - User logins to the Growthcast\n\u003e - Starting to fetch his data from the current day to his first day until his first day by batches\n\u003e - Adding batches of data to the database, so a service can get access to data without waiting for fetching of all data\n\n![growthcast-backend-schema](https://github.com/maikReal/growthcast-proxy/blob/main/public/growthcast-logic.jpg?raw=true)\n\n# License\n\nShield: [![CC BY 4.0][cc-by-shield]][cc-by]\n\nThis work is licensed under a\n[Creative Commons Attribution 4.0 International License][cc-by].\n\n[![CC BY 4.0][cc-by-image]][cc-by]\n\n[cc-by]: http://creativecommons.org/licenses/by/4.0/\n[cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png\n[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xdeval%2Fgrowthcast-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xdeval%2Fgrowthcast-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xdeval%2Fgrowthcast-proxy/lists"}