Here is an AutoBlog web app that I built with partial help from AI. I want to be clear: some parts were assisted, especially the areas I had no prior experience with—mainly AWS, which I used for the first time during this challenge. I also had limited experience with Docker, images, and multi-service environments, but I still managed to complete and deploy the entire system successfully.
-
React + Node.js (Express):
I chose these because they have a huge community, excellent documentation, and a wide range of packages and tools. The ecosystem around npm makes development faster and more flexible. -
PostgreSQL:
I selected PostgreSQL because it is widely used in production, very stable, open-source, and supported by many ORMs such as Prisma. It's also easy to manage and works well inside Docker environments. -
GROQ API:
I used GROQ because it is simple to integrate and supports multiple AI models. It was suitable for generating automatic blog content with minimal overhead. -
AWS EC2 + CodeBuild + ECR:
I deployed the project on AWS following the challenge requirements. The backend, frontend, and database run inside Docker containers, and CodeBuild handles the automated build and deployment steps. The app is hosted on an EC2 instance with a live public URL. -
Nginx (Frontend SPA Hosting):
The frontend is built with Vite and served using Nginx inside a Docker container.- SPA routes (
/about,/blog/:id) are handled correctly using thetry_files $uri /index.html;directive. - Static assets are served normally under
/assets/. - The configuration is included in
front-end/nginx.confand copied into the container during the Docker build.
- SPA routes (
To qualify for the challenge requirements, I implemented automatic daily blog generation.
I used node-cron, and the scheduler runs every day at 3:00 AM, where it triggers a background job that generates a new article using the GROQ API and inserts it into the PostgreSQL database.
- AMI: Amazon Linux 2023 (Kernel 6.1)
- Architecture: 64-bit (x86)
- Instance type: t3.micro
- Security group:
AutoBlog- Add rule: SSH, Port 22, Source 0.0.0.0/0
- Key pair: Download your key pair file locally
ssh -i "your-key-pair.pem" ec2-user@YOUR_PUBLIC_DNSsudo yum update -y
sudo yum install -y docker
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker ec2-userexit
ssh -i "your-key-pair.pem" ec2-user@YOUR_PUBLIC_DNSsudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --versionsudo yum install -y gitcd /home/ec2-user
git clone https://github.com/Hemn-Raqib-Aziz/AutoBlog.git
cd AutoBlog/infraBackend .env (../back-end/src/.env):
PORT=4000
DB_HOST=db
DB_USER=postgres
DB_PASSWORD=your_db_password
DB_PORT=5432
DB_NAME=blogs
INIT_DB_NAME=postgres
GROQ_API_KEY=your_groq_api_key
# to run the project locally, write the line below
FRONT_END_URL=http://localhost:5173Frontend .env (../front-end/.env):
VITE_API_BASE_URL=http://localhost:4000/api/auto-generated-blogsdocker-compose up -d --build-
Frontend: http://your_aws_public_dns.your_aws_region.compute.amazonaws.com:5173/
-
Daily blog generation runs at 3:00 AM via node-cron