Skip to content

Sprint #3 PR#7

Open
dannymccarragher wants to merge 19 commits intokellerflint:mainfrom
dannymccarragher:main
Open

Sprint #3 PR#7
dannymccarragher wants to merge 19 commits intokellerflint:mainfrom
dannymccarragher:main

Conversation

@dannymccarragher
Copy link
Copy Markdown

  • Dockerized Frontend, Backend, and database.
  • Complete Dockerized Image deployed to VM.
  • Updated README with local development setup and deployment steps.
  • Created a script for deployment automation.
  • Included additional Features: Deletion of Patterns, PDF export.

Copy link
Copy Markdown
Contributor

@rifflere rifflere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks great!
Favorite Features:

  • Exporting to PDF
  • Delete pattern route
    Suggestions for Improvement:
  • Use .envs to ensure no sensitive info is leaked
  • Avoid using magic numbers


---

## 🧰 Troubleshooting
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great troubleshooting table!

# Clone repo if not exists
if [ ! -d "pixel-to-pattern" ]; then
echo "Cloning repository..."
git clone https://github.com/<your-username>/pixel-to-pattern.git
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This shell script overall looks useful, clean, easy to understand - I would note in the README, though, that there are a couple of spots that need manually updated to run properly (like '').

ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://143.198.63.60:3001
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be added to an .env file.

- "3001:3001"
environment:
- DB_USER=pixel_user
- DB_PASSWORD=PixelPattern123!
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be in a .env file.

}

const exportPDF = () => {
if (!post || !patternConfig) return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's awesome that you built an exportPDF feature, but there are a LOT of magic numbers here!

}
}

// DELETE Pattern
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature add!

Copy link
Copy Markdown

@KaalidArare KaalidArare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't get to do a in depth check of the code but overall high readability and well structured !

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice relabeling the project to alias build.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice way to put things in env for reusability. Also, beautifully well-structured code with comments easy to follow

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks simple but nice addition to be able to have a user export their pattern as a PDF. Great user feature. Also very nice to remove the console.logs and ensure a safety check before the pattern gets printed out

// handling deletion of pattern
const handleDelete = async () => {

// confirm action before deleting
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice safety check from the user

# Run containers
docker compose up -d

# Stop containers
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice commands! Easy to read.

}

// save the PDF with pattern name
doc.save(`${post.pattern_name}.pdf`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole part looks really clean and with the comments too. Makes it easier to understand. - Laura

try {
// send DELETE request to backend
const res = await fetch(`${API_URL}/patterns/${id}`, {
method: "DELETE"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting usage of the method: DELETE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants