{"id":25060336,"url":"https://github.com/arcestia/atprotoblog","last_synced_at":"2025-05-07T15:08:39.702Z","repository":{"id":262966211,"uuid":"870658339","full_name":"arcestia/atprotoblog","owner":"arcestia","description":"A Blog Utilizing ATProtocol. With Integration Self-hosted option Markdown Post and Medium.","archived":false,"fork":false,"pushed_at":"2025-01-11T10:37:21.000Z","size":4252,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T20:51:51.090Z","etag":null,"topics":["atprotocol","blog","dockerized","redis","remix"],"latest_commit_sha":null,"homepage":"https://skiddle.id","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/arcestia.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T12:43:51.000Z","updated_at":"2025-01-21T11:53:49.000Z","dependencies_parsed_at":"2024-11-19T02:16:14.338Z","dependency_job_id":"aec8e59a-5e4a-4e72-9e2f-d2383ac698f9","html_url":"https://github.com/arcestia/atprotoblog","commit_stats":null,"previous_names":["arcestia/atprotoblog"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcestia%2Fatprotoblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcestia%2Fatprotoblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcestia%2Fatprotoblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcestia%2Fatprotoblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arcestia","download_url":"https://codeload.github.com/arcestia/atprotoblog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246458009,"owners_count":20780678,"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":["atprotocol","blog","dockerized","redis","remix"],"created_at":"2025-02-06T15:58:10.322Z","updated_at":"2025-03-31T11:16:26.286Z","avatar_url":"https://github.com/arcestia.png","language":"TypeScript","readme":"# Atprotoblog - An ATProtocol Blog\n\nA simple little blog that pulls posts from your PDS, using the `com.whtwnd.blog.entry` lexicon.\n\n```ts\ninterface WhtwndBlogEntryRecord {\n  $type: 'com.whtwnd.blog.entry'\n  content?: string\n  createdAt: string\n  theme?: string\n  title: string\n  ogp?: {\n    height: number | null\n    url: string | null\n    width: number | null\n  }\n}\n\ninterface WhtwndBlogEntryView {\n  rkey: string\n  cid: string\n  title: string\n  content?: string\n  createdAt: string\n  banner?: string\n}\n```\n\n## Configuration\n\nJust a few things are needed in your `.env` file.\n\n```shell\nATP_SERVICE=https://pds.skiddle.id/\nATP_IDENTIFIER=skiddle.id\nATP_DID=did:plc:kbpcqituf5ku6xorxo2wzdee\n```\n\n- `ATP_SERVICE` is the URL of your PDS. It's probably hosted by Bluesky. Find it at [internect.info](https://internect.info).\n- `ATP_IDENTIFIER` is your handle. It's used to know which repo to get records from.\n- `ATP_DID` is...your DID. Again, find it at [internect.info](https://internect.info). Used to get your Bluesky profile (I use this just to get the already-hosted copy of your profile picture. You could rewrite this if you wanted to, would be faster too).\n\n## Development\n\nJust run the Vite server, you know, like usual?\n\n```shell\nyarn run dev\n```\n\n## Deployment\n\nMake sure you have `dotenv-cli` installed.\n\n```shell\nnpm install -g dotenv-cli\n```\n\nThen build and serve.\n\n```shell\nyarn build\nyarn start\n```\n\n## Creating Posts\n\nThere's various ways you could do this. I just use a Markdown editor and then manually save them with `createRecord`. You can also use the editor at [whtwnd's website](https://whtwnd.com/edit) to create them.\n\n## Deployment Using Docker\n\nYou can deploy `atprotoblog` using Docker for a more streamlined and isolated environment. Here’s how:\n\n1. **Build the Docker Image**:\n\n   ```shell\n   docker build -t atprotoblog .\n   ```\n\n2. **Run the Container**:\n\n   To run the container and expose it on a specific port (e.g., port 3000):\n\n   ```shell\n   docker run -d -p 3000:3000 --name atprotoblog ghcr.io/arcestia/atprotoblog:latest\n   ```\n\n3. **Using Docker Compose**:\n\n   Alternatively, you can use Docker Compose for a more declarative setup. Create a `docker-compose.yml`:\n\n   ```yaml\n   version: '3.8'\n\n   services:\n     atprotoblog:\n       image: ghcr.io/arcestia/atprotoblog:latest\n       container_name: atprotoblog\n       ports:\n         - \"3000:3000\"\n       environment:\n         - NODE_ENV=production\n       restart: unless-stopped\n   ```\n\n   Then run:\n\n   ```shell\n   docker-compose up -d\n   ```\n\nThis approach will help in quickly deploying the application, allowing you to manage it effectively with Docker's features like container restarts and isolated environments.\n\n## PM2 Deployment\n\nAs an alternative to Docker deployment, you can use PM2 to run the application:\n\n### Prerequisites\n- Node.js 18 or later\n- Yarn package manager\n- PM2 (installed globally or as a project dependency)\n\n### Deployment Steps\n\n1. Install dependencies:\n```bash\nyarn install\n```\n\n2. Build the application:\n```bash\nyarn build\n```\n\n3. Start the application with PM2:\n```bash\nyarn start:pm2\n```\n\n### PM2 Management Commands\n\n- Stop the application: `yarn stop:pm2`\n- Reload the application: `yarn reload:pm2`\n- View logs: `pm2 logs atprotoblog`\n- Monitor: `pm2 monit`\n- List running apps: `pm2 list`\n\n### Environment Variables\n\nMake sure to set up your environment variables before deploying. You can modify them in the `ecosystem.config.js` file:\n\n- `NODE_ENV`: Production environment\n- `ATP_SERVICE`: Your ATP service URL\n- `ATP_IDENTIFIER`: Your ATP identifier\n- `ATP_DID`: Your ATP DID\n- `REDIS_URL`: Redis connection URL\n- `PORT`: Application port (default: 3000)\n\n## Related Project\n\nThis project is based on [blug](https://github.com/haileyok/blug) by haileyok. I have made some modifications and Dockerized it to make deployment easier.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcestia%2Fatprotoblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcestia%2Fatprotoblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcestia%2Fatprotoblog/lists"}