From 985c495e7c4991bca36bc3a290e57e35818aca5f Mon Sep 17 00:00:00 2001 From: vanessa6411-lgtm Date: Thu, 2 Oct 2025 21:41:56 -0400 Subject: [PATCH 1/3] Update deploy.yml --- .github/workflows/deploy.yml | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f2d0a7b..29cc7f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,3 +1,114 @@ +name: Export Postgres and upload to S3 + +on: + workflow_dispatch: # permite rodar manualmente pela UI + push: + branches: [ main ] # também roda quando fizer push em main + +jobs: + export-and-upload: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Start SSH agent and load key + uses: webfactory/ssh-agent@v0.8.1 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Create CSV on remote (EC2) from conversations table + run: | + ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF' + # usar sudo -u postgres para executar psql com o usuário postgres + sudo -u postgres psql -d aiarchives -c "\copy (SELECT id, content, created_at FROM conversations ORDER BY id DESC) TO '/tmp/conversations.csv' WITH CSV HEADER" + ls -l /tmp/conversations.csv + EOF + + - name: Copy CSV from remote to runner + run: | + scp -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/tmp/conversations.csv ./conversations.csv + ls -lh conversations.csv + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Upload CSV to S3 + run: | + aws s3 cp ./conversations.csv s3://${{ secrets.AWS_BUCKET_NAME }}/conversations-${{ github.run_id }}.csv --acl public-read + echo "https://${{ secrets.AWS_BUCKET_NAME }}.s3.${{ secrets.AWS_REGION }}.amazonaws.com/conversations-${{ github.run_id }}.csv" + + + + + +name: Deploy to EC2 (Production) + +on: + push: + branches: [ main ] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: production + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Create .env file from secrets + run: | + cat > .env < /dev/null; then + if [ -f ecosystem.config.js ]; then + pm2 reload ecosystem.config.js || pm2 start ecosystem.config.js + else + pm2 restart all || pm2 start npm --name "aiarchives" -- start + fi + fi + EOF + + name: Deploy AI Archives to EC2 on: From 10035a33d87fc31d295c4bb4832c441892e07552 Mon Sep 17 00:00:00 2001 From: vanessa6411-lgtm Date: Mon, 6 Oct 2025 23:41:14 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 60 ++++++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index e215bc4..2a4d2a2 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,24 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. +💻 Software Engineering Internship (TechX Labs, Inc.) +📅 Duration: September 08, 2025 – November 07, 2025 +🖥️ Location: Remote (Boston, MA) + +📝 Internship Overview +Participated in the Software Engineering Intern program at TechX Labs, gaining hands-on experience with real-world projects focused on large-scale web architecture and distributed systems. Developed technical skills under the guidance of experienced engineers while contributing to enterprise-grade solutions. + +⚙️ Key Activities +🧪 Assisted in building and optimizing cloud-native infrastructure +🕵️‍♂️ Contributed to high-availability system design and performance improvements +🔍 Applied security best practices and worked with monitoring/logging systems +🧬 Collaborated with mentors and peers on real-world engineering projects +🛠️ Gained practical experience with technologies such as VMSS, load balancers, and Redis caching + +💡 Skills Demonstrated +🛡️ Cloud and Distributed Systems +🚨 Performance Optimization & High-Availability Design +📊 Enterprise-Grade Software Development +🌐 Security Best Practices Implementation +📁 Technical Documentation & Collaboration +🧠 Critical Thinking in Software Engineering + +🏁 Conclusion +This internship provided me with valuable practical experience in software engineering, particularly in large-scale web architecture and distributed systems. It strengthened my technical and problem-solving skills while giving me confidence to contribute effectively to professional engineering teams. I look forward to applying these skills in future projects and advancing my knowledge in software development and cloud technologies. From b4629217fa6911bd348171e33d451904e48cebb6 Mon Sep 17 00:00:00 2001 From: vanessa6411-lgtm Date: Tue, 14 Oct 2025 22:56:38 -0400 Subject: [PATCH 3/3] Update deploy.yml --- .github/workflows/deploy.yml | 49 ------------------------------------ 1 file changed, 49 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 29cc7f2..341b5af 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,52 +1,3 @@ -name: Export Postgres and upload to S3 - -on: - workflow_dispatch: # permite rodar manualmente pela UI - push: - branches: [ main ] # também roda quando fizer push em main - -jobs: - export-and-upload: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Start SSH agent and load key - uses: webfactory/ssh-agent@v0.8.1 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - - name: Create CSV on remote (EC2) from conversations table - run: | - ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF' - # usar sudo -u postgres para executar psql com o usuário postgres - sudo -u postgres psql -d aiarchives -c "\copy (SELECT id, content, created_at FROM conversations ORDER BY id DESC) TO '/tmp/conversations.csv' WITH CSV HEADER" - ls -l /tmp/conversations.csv - EOF - - - name: Copy CSV from remote to runner - run: | - scp -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/tmp/conversations.csv ./conversations.csv - ls -lh conversations.csv - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Upload CSV to S3 - run: | - aws s3 cp ./conversations.csv s3://${{ secrets.AWS_BUCKET_NAME }}/conversations-${{ github.run_id }}.csv --acl public-read - echo "https://${{ secrets.AWS_BUCKET_NAME }}.s3.${{ secrets.AWS_REGION }}.amazonaws.com/conversations-${{ github.run_id }}.csv" - - - - - name: Deploy to EC2 (Production) on: