{"id":18822146,"url":"https://github.com/amirgamil/carly","last_synced_at":"2025-04-14T01:06:18.505Z","repository":{"id":113330900,"uuid":"357700078","full_name":"amirgamil/carly","owner":"amirgamil","description":"Generate beautiful letters for your loved ones","archived":false,"fork":false,"pushed_at":"2021-05-09T00:01:37.000Z","size":11800,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T01:06:09.013Z","etag":null,"topics":["go","javascript","mongodb-atlas","nextjs","server-side"],"latest_commit_sha":null,"homepage":"https://carly.amirbolous.com","language":"JavaScript","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/amirgamil.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":"security/encrypt.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-13T22:04:16.000Z","updated_at":"2024-06-04T20:32:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"400aa688-60c9-460e-a9e8-d4006bd8b829","html_url":"https://github.com/amirgamil/carly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirgamil%2Fcarly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirgamil%2Fcarly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirgamil%2Fcarly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirgamil%2Fcarly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirgamil","download_url":"https://codeload.github.com/amirgamil/carly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804803,"owners_count":21164134,"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":["go","javascript","mongodb-atlas","nextjs","server-side"],"created_at":"2024-11-08T00:48:02.747Z","updated_at":"2025-04-14T01:06:18.476Z","avatar_url":"https://github.com/amirgamil.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carly ✉️\n#### Genereate beautiful letters for your loved ones that can be shared in seconds\nCarly was written to help me send a birthday letter to my mum halfway around the world. Now anyone can do it too!\n\n\n![letter1](https://user-images.githubusercontent.com/7995105/116254324-3fcb5300-a73f-11eb-8398-fcf53bd9d1dc.png)\n![letter2](https://user-images.githubusercontent.com/7995105/116254322-3f32bc80-a73f-11eb-8f33-059b34550093.png)\n![letter3](https://user-images.githubusercontent.com/7995105/116254321-3f32bc80-a73f-11eb-955c-64624f298e41.png)\n![letter4](https://user-images.githubusercontent.com/7995105/116254320-3f32bc80-a73f-11eb-984d-0e01913439f5.png)\n\n## Details\nCarly is written in Next.js + React on the frontend (hosted on Vercel) and Go with MongoDB Atlas on the backend (hosted as a systemd file with nginx on Digital Ocean).\n\nTo run this locally, you will need to run the web server in Go (using `go run main.go`) as well as the frontend (navigate inside the frontend directory and run `yarn dev`).\n\nYou will also need a MongoDB atlas account (free tier M0 can be accessed by anyone). Once you've made an account, configure a user with admin access and store the username, password, and shared URL in a .env file with MONGO_USER, MONGO_PASS, MONGO_SHARD_URL as the variable names respectively. Make sure that this .env file is located in the same directory as the go.mod file.\n\nYou will also need to create a .env.local file inside the frontend folder and populate it with two variables \n`NEXT_PUBLIC_HOST=localhost:3000\nNEXT_PUBLIC_HOSTAPI=127.0.0.1:port/api`\nYou can select any port like 8998. \n\n## API\nThe API provides two endpoints \n### `POST /api`\n- Accepts a JSON body that looks like this:\n`{\n  \"title\": \"titleLetter\",\n  \"expiry\": \"getExpiryDate()\", \n  \"password\": \"\",\n  \"content\": [\n    {\n    \"person\": \"person1\",\n    \"msg\": \"msg1\",\n    \"imgAdd\": \"imgAdd1\"\n   },\n   {\n     \"person\":\"person2\",\n     \"msg\": \"msg2\",\n     \"imgAdd\": \"imgAdd2\"\n   }...\n  ]\n}`\n\nThe API returns the genereated hash if successful\n`#200 OK\n#{ \"hash\": \"166989a\"}`\n\n### `GET /api/{hash}`\nThe API returns\n`#401 Unauthorized` if the letter is password protected\n\nOR \n\n`#404 Bad request` if it does not find the hash in the database (or for any other possible error)\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n## Acknowledgements\n* [Ctrl-v](https://github.com/jackyzha0/ctrl-v)\n* [Block CSS](https://thesephist.github.io/blocks.css/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirgamil%2Fcarly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirgamil%2Fcarly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirgamil%2Fcarly/lists"}