{"id":20348164,"url":"https://github.com/bayesianinstitute/moonlit","last_synced_at":"2025-03-04T16:16:02.912Z","repository":{"id":258273202,"uuid":"863648624","full_name":"bayesianinstitute/moonlit","owner":"bayesianinstitute","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-10T21:10:18.000Z","size":2703,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-10T22:26:19.089Z","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/bayesianinstitute.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-09-26T16:56:25.000Z","updated_at":"2025-01-10T21:10:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"88fa5ffe-aa4d-4320-8650-ef13c9a148ee","html_url":"https://github.com/bayesianinstitute/moonlit","commit_stats":null,"previous_names":["bayesianinstitute/moonlit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesianinstitute%2Fmoonlit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesianinstitute%2Fmoonlit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesianinstitute%2Fmoonlit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesianinstitute%2Fmoonlit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bayesianinstitute","download_url":"https://codeload.github.com/bayesianinstitute/moonlit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241877503,"owners_count":20035417,"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-14T22:19:21.601Z","updated_at":"2025-03-04T16:16:02.665Z","avatar_url":"https://github.com/bayesianinstitute.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moonlit Deployment\r\n\r\n## AWS EC2 Instance Setup\r\n\r\n### Create an AWS Account:\r\n\r\n- Sign up for one at AWS Console if you don't have an AWS account.\r\n\r\n### Access AWS Console:\r\n\r\n- Log in to the AWS Management Console.\r\n\r\n### Navigate to EC2 Dashboard:\r\n\r\n- Go to the \"EC2 Dashboard.\"\r\n\r\n### Launch an Instance:\r\n\r\n1. Click on \"Launch Instance\" to create a new EC2 instance.\r\n2. Select an Ubuntu Server AMI (choose the latest Ubuntu LTS version).\r\n\r\n### Choose an Instance Type:\r\n\r\n- For the server: Use `t2.micro`.\r\n- For the client: Use `t2.small` (recommended `t2.medium`).\r\n\r\n### Configure Instance:\r\n\r\n- Configure instance details as per your requirements.\r\n- Add storage: Set the size to 30 GB.\r\n- Configure security group: Add a rule to allow TCP traffic for the application's port (e.g., 5000, 8000).\r\n\r\n### Review and Launch:\r\n\r\n- Review configuration and click \"Launch.\"\r\n- Create a key pair if needed.\r\n\r\n### Access Your EC2 Instance:\r\n\r\n- Use SSH to connect:\r\n\r\n```bash\r\nssh -i /path/to/your/key.pem ubuntu@your-instance-ip\r\n```\r\n\r\n### Allow Port Access:\r\n\r\n- Allow ports 80 and 8000 for frontend and backend in inbound rules.\r\n\r\n---\r\n\r\n## Installation Instructions\r\n\r\n### Install Node.js and npm:\r\n\r\n1. Install NVM:\r\n\r\n```bash\r\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\r\nsource ~/.nvm/nvm.sh\r\nnvm install 18.16.1\r\nnpm install\r\n```\r\n\r\n2. Verify versions:\r\n\r\n```bash\r\nnode -v\r\nnpm -v\r\n```\r\n\r\n3. Install PM2 for process management:\r\n\r\n```bash\r\nnpm install -g pm2\r\n```\r\n\r\n### Install Git:\r\n\r\n```bash\r\nsudo apt update\r\nsudo apt install git\r\ngit --version\r\n```\r\n\r\n---\r\n\r\n## Run\r\n\r\n### Client Setup:\r\n\r\n1. Clone the repository:\r\n\r\n```bash\r\ngit clone https://github.com/bayesianinstitute/moonlit.git\r\n```\r\n\r\n2. Set environment variables:\r\n\r\n```bash\r\ncd moonlit/client\r\nnano .env.local\r\n```\r\n\r\nIn the .env.local\r\n\r\n```bash\r\nNEXT_PUBLIC_API_URL=\r\n```\r\n\r\n3. Install and run:\r\n\r\n```bash\r\nnpm i\r\nsudo ln -s $(which npm) /usr/local/bin/npm\r\nsudo ln -s $(which node) /usr/local/bin/node\r\nnpm install -g pm2\r\nnpm run build\r\nsudo env \"PATH=$PATH\" pm2 start \"npm run start\" --name client\r\n\r\n```\r\n\r\n### Server Setup:\r\n\r\n1. Clone the repository:\r\n\r\n```bash\r\ngit clone https://github.com/bayesianinstitute/moonlit.git\r\n```\r\n\r\n2. Set environment variables:\r\n\r\n```bash\r\ncd moonlit/backend\r\nnano .env\r\n```\r\n\r\nIn the .env\r\n\r\n```bash\r\nSTABILITY_KEY=\r\nOPENAI_API_KEY=\r\nEMAIL_HOST=\r\nEMAIL_PORT=\r\nEMAIL_USER=\r\nEMAIL_PASS=\r\nCORS_ORIGINS=\r\n```\r\n\r\n3. Create and activate virtual environment:\r\n\r\n```bash\r\npython -m venv env\r\nsource env/bin/activate\r\npip install -r requirements.txt\r\n```\r\n\r\n4. Start server:\r\n\r\n```bash\r\nsudo env \"PATH=$PATH\" npm install -g pm2\r\npm2 start kartoon.py --interpreter python3\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayesianinstitute%2Fmoonlit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbayesianinstitute%2Fmoonlit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayesianinstitute%2Fmoonlit/lists"}