Conversation
dannymccarragher
commented
Oct 30, 2025
- 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.
…v, created MySQL database
Delete pattern function
…deletePattern file
rifflere
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
This can be added to an .env file.
| - "3001:3001" | ||
| environment: | ||
| - DB_USER=pixel_user | ||
| - DB_PASSWORD=PixelPattern123! |
There was a problem hiding this comment.
These should be in a .env file.
| } | ||
|
|
||
| const exportPDF = () => { | ||
| if (!post || !patternConfig) return; |
There was a problem hiding this comment.
It's awesome that you built an exportPDF feature, but there are a LOT of magic numbers here!
| } | ||
| } | ||
|
|
||
| // DELETE Pattern |
… PDF and delete Pattern file
KaalidArare
left a comment
There was a problem hiding this comment.
Didn't get to do a in depth check of the code but overall high readability and well structured !
There was a problem hiding this comment.
nice relabeling the project to alias build.
There was a problem hiding this comment.
Nice way to put things in env for reusability. Also, beautifully well-structured code with comments easy to follow
There was a problem hiding this comment.
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 |
| # Run containers | ||
| docker compose up -d | ||
|
|
||
| # Stop containers |
| } | ||
|
|
||
| // save the PDF with pattern name | ||
| doc.save(`${post.pattern_name}.pdf`); |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Interesting usage of the method: DELETE.