diff --git a/README.md b/README.md index ef9db6d..b3b893c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,60 @@ -# CV Management System API +### **CV Management System API ๐Ÿ“œ โœ๏ธ** +
+ +**This project provides a platform for managing user data and generating custom CV templates.** +
+ +![](https://i.imgur.com/waxVImv.png) +
+ +![freeCodeCamp Social Banner](https://venngage-wordpress.s3.amazonaws.com/uploads/2021/11/section-3-resume-banner-1-1.png) +
+ +![](https://i.imgur.com/waxVImv.png) + +
+ +[![GitHub Repo stars](https://img.shields.io/badge/Project%20mindmap-Miro-yellow?logo=miro)](https://reddit.com/submit?url=https://github.com/) +[![GitHub Repo stars](https://img.shields.io/badge/Thanks%20Contributors-โค๏ธ-red?logo=github)](https://github.com/damarisnicolae/CV_project/graphs/contributors/) +
+ + + +
+ +### **Table of contents** +
+ +1. [Directory structure Hierarchy](#directory-structure-hierarchy) +2. [Components](#components) +3. [Prerequisites](#prerequisites) +4. [Environment variables file .env file](#environment-variables-file-env-file) +5. [Install Basic Tools](#install-basic-tools) +6. [Replace Paths](#replace-paths) +7. [Create DB, users table](#create-db-users-table) +8. [Verify successful import](#verify-successful-import) +9. [Change DB user password](#change-db-user-password) +10. [Build the backend API](#build-the-backend-api) +11. [BFF Flask app setup frontend](#bff-flask-app-setup-frontend) +12. [SSH conection](#ssh-conection) +13. [Github commit](#github-commit) +14. [Start the project](#start-the-project-makefile) +15. [Docker](#docker) +16. [Browser links](#browser-links) +17. [Other free resources](#other-free-resources) +
+ +### **Directory structure Hierarchy** +
-This project provides a platform for managing user data and generating custom CV templates. -## Directory structure Hierarchy ```sh CV_project +โ”œโ”€โ”€ .github # GitHub configuration directory +โ”‚ โ””โ”€โ”€ workflows # GitHub Actions workflows +โ”‚ โ”œโ”€โ”€ integration-tests.yml # Workflow for integration tests +โ”‚ โ”œโ”€โ”€ unit-tests.yml # Workflow for unit tests +โ”‚ โ””โ”€โ”€ venom-tests.yml # Workflow for venom tests โ”œโ”€โ”€ api # Go API - backend โ”‚ โ”œโ”€โ”€ CV_project # Executable file ... (cd $PathCvProject/api && go build -o CV_project main.go) โ”‚ โ”œโ”€โ”€ example.pdf # Sample PDF @@ -29,36 +79,33 @@ CV_project โ”‚ โ”‚ โ”œโ”€โ”€ template2.html # CV template 2 โ”‚ โ”‚ โ””โ”€โ”€ template3.html # CV template 3 โ”‚ โ””โ”€โ”€ users.js # JavaScript - user-related functionality -โ”œโ”€โ”€ db.cnf # Database configuration -โ”œโ”€โ”€ docker-compose.yml # Docker Compose configuration -โ”œโ”€โ”€ .env # Environment variables file -โ”œโ”€โ”€ .gitignore # Git ignore - version control -โ”œโ”€โ”€ .github # GitHub configuration directory -โ”‚ โ””โ”€โ”€ workflows # GitHub Actions workflows -โ”‚ โ”œโ”€โ”€ integration-tests.yml # Workflow for integration tests -โ”‚ โ”œโ”€โ”€ unit-tests.yml # Workflow for unit tests -โ”‚ โ””โ”€โ”€ venom-tests.yml # Workflow for venom tests -โ”œโ”€โ”€ Makefile # Building and running -โ”œโ”€โ”€ README.md # Project documentation โ”œโ”€โ”€ sql # SQL files - database schema -โ”‚ โ”œโ”€โ”€ db.cnf # Database configuration โ”‚ โ”œโ”€โ”€ Dockerfile # Dockerfile - sql -โ”‚ โ”œโ”€โ”€ mysql.pid # MySQL process ID file โ”‚ โ”œโ”€โ”€ schemadump.sql # Schema creation and sample data โ”‚ โ””โ”€โ”€ schema.sql # Schema creation only -โ””โ”€โ”€ src # Source code - โ””โ”€โ”€ __init__.py # Initialization and configuration +โ”œโ”€โ”€ src # Source code +โ”‚ โ””โ”€โ”€ __init__.py # Initialization and configuration +โ”œโ”€โ”€ .env # Environment variables file +โ”œโ”€โ”€ .gitignore # Git ignore - version control +โ”œโ”€โ”€ Makefile # Building and running +โ”œโ”€โ”€ README.md # Project documentation +โ””โ”€โ”€ docker-compose.yml # Docker Compose configuration ``` +
-## Components: +### **Components:** +
- Backend (Go) : HandlMYSQL_ + Backend (Go) : Handles user data management, authentication, and PDF generation. + Frontend (Python,Flask) : Provides the web interface for user interaction. + Database (SQL) : Stores user information. -MYSQL_s user data management, authentication, and PDF generation. -Frontend (Python,Flask) : Provides the web interface for user interaction. -Database (SQL) : Stores user information. +
+ โ†ฅ Top ๐Ÿ” +
-## Prerequisites: +### **Prerequisites:** +
- `Go `: _Backend development_ - `Flask `: _Frontend development_ @@ -68,7 +115,12 @@ Database (SQL) : Stores user information. - `Docker & Docker Compose `: _Containerized deployment_ -## Environment variables file: .env file +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Environment variables file: .env file** +
```sh MYSQL_ROOT_PASSWORD=*** @@ -81,7 +133,12 @@ MYSQL_DATABASE=users MYSQL_PORT=3306 ``` -## Install Basic Tools: +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Install Basic Tools:** +
```sh sudo apt update && sudo apt upgrade && sudo apt install -y git curl build-essential golang-go python3 python3-pip wkhtmltopdf docker.io docker-compose selinux-utils curl mysql-server @@ -89,14 +146,24 @@ sudo mysql_secure_installation pip install --break-system-packages Flask Flask-Bcrypt Flask-Migrate Flask-SQLAlchemy ``` -## Replace Paths +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Replace Paths** +
```sh PathCvProject="/bcn/github/CV_project" grep -q "PathCvProject=" ~/.bashrc || echo "export PathCvProject=\"$PathCvProject\" # Set path to CV project." >> ~/.bashrc && source ~/.bashrc ``` -## Create DB, users table +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Create DB, users table** +
```sh sudo mysql -u root -p @@ -105,7 +172,12 @@ USE users; SOURCE /bcn/github/CV_project/sql/schemadump.sql; ``` -## Verify successful import +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Verify successful import** +
```sh mysql -u root -p users @@ -118,13 +190,23 @@ SELECT * FROM template; SELECT * FROM users; ``` -## Change DB user password +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Change DB user password** +
```sh ALTER USER 'CV_user'@'localhost' IDENTIFIED BY 'Y0ur_strong_password'; ``` -## Build the backend API +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Build the backend API** +
```sh cd $PathCvProject/api @@ -135,16 +217,25 @@ export DB_PASSWORD="?????????????" ./CV_project ``` +
+ โ†ฅ Top ๐Ÿ” +
+ ## BFF Flask app setup frontend +
```sh cd $PathCvProject/bff python3 app.py -i 127.0.0.1 -p 8080 ``` -# Github +
+ โ†ฅ Top ๐Ÿ” +
+ -### SSH conection +### **Github SSH conection** +
```sh GitSshKey="/PathTo/.ssh/github_rsa" @@ -158,7 +249,12 @@ git config --global http.sslBackend "openssl" ssh -T git@github.com ``` -### Commit & pull-push, avoid conflicts +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Github commits** +
```sh echo "Enter commit message (Title case, infinitive verb, brief and clear summary of changes):" @@ -169,7 +265,12 @@ git commit -m "$CommitMssg" git pull && git push origin main ``` -## Start the project: Makefile +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Start the project: Makefile** +
```sh cd $PathCvProject @@ -178,25 +279,100 @@ make # Build and start the services make docker # # Start services using Docker Compose ``` -## Docker +
+ โ†ฅ Top ๐Ÿ” +
-```sh -docker-compose build # build -docker-compose up # start -docker-compose up -d # run background -docker-compose stop # only stop -docker-compose down # stops and removes containers -docker-compose ps # view running containers -docker-compose rm # removes stopped service containers -``` -## Browser links +### ****Docker**** + + +| | Command | Description | +|:---|:---|:---| +|๐Ÿ”จ |`docker-compose build ` |# build +|๐Ÿ”ผ |`docker-compose up ` |# start +|๐Ÿ”˜ |`docker-compose up -d ` |# run background +|๐Ÿ›‘ |`docker-compose stop ` |# only stop +|๐Ÿ”ฝ |`docker-compose down ` |# stops and removes containers +|๐Ÿฉบ |`docker-compose ps ` |# view running containers +|๐Ÿงน |`docker-compose rm ` |# removes stopped service containers + + +
+ โ†ฅ Top ๐Ÿ” +
+ +### **Browser links** +
+ +- [Miro](https://miro.com/app/board/uXjVK6HA_1A=/) + +- [template1](http://127.0.0.1:5000/template1) + +- [template2](http://127.0.0.1:5000/template2) + +- [template3](http://127.0.0.1:5000/template3) +# +![](https://i.imgur.com/waxVImv.png) + +### **List of Free Learning Resources In Many Languages** +
+ +
+ +[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)  +[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)  +[![Hacktoberfest 2023 stats](https://img.shields.io/github/hacktoberfest/2023/EbookFoundation/free-programming-books?label=Hacktoberfest+2023)](https://github.com/EbookFoundation/free-programming-books/pulls?q=is%3Apr+is%3Amerged+created%3A2023-10-01..2023-10-31) + +
+ + +### **Where To Look For Further Info :thinking:** +
+ +- [freeCodeCamp Guide](https://guide.freecodecamp.org/) +- [GeeksForGeeks](https://www.geeksforgeeks.org/) +- [Dev.To](https://dev.to/) +- [Stack Overflow](https://stackoverflow.com/) +- [Dzone](https://dzone.com/) +
+ +### **Other free resources** +
-https://miro.com/app/board/uXjVK6HA_1A=/ ++ [English, Books By Programming Language](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-langs.md/) ++ [English, Interactive Programming Resources](https://github.com/EbookFoundation/free-programming-books/blob/main/more/free-programming-interactive-tutorials-en.md) ++ [English Courses](https://github.com/EbookFoundation/free-programming-books/blob/main/courses/free-courses-en.md) -http://127.0.0.1:5000/template1 +
+ โ†ฅ Top ๐Ÿ” +
-http://127.0.0.1:5000/template2 +### **Coding Practice Sites :zap:** +
-http://127.0.0.1:5000/template3 +- :link: [CodeForces](http://codeforces.com/) +- :link: [CodeChef](https://www.codechef.com) +- :link: [Coderbyte](https://coderbyte.com/) +- :link: [CodinGame](https://www.codingame.com/) +- :link: [Cs Academy](https://csacademy.com/) +- :link: [HackerRank](https://hackerrank.com/) +- :link: [Spoj](https://spoj.com/) +- :link: [HackerEarth](https://hackerearth.com/) +- :link: [TopCoder](https://www.topcoder.com/) +- :link: [Codewars](https://codewars.com/) +- :link: [Exercism](http://www.exercism.io/) +- :link: [CodeSignal](https://codesignal.com/) +- :link: [Project Euler](https://projecteuler.net/) +- :link: [LeetCode](https://leetcode.com/) +- :link: [Firecode.io](https://www.firecode.io/) +- :link: [InterviewBit](https://www.interviewbit.com/) +- :link: [uCoder](https://ucoder.com.br) +- :link: [LintCode](https://www.lintcode.com/) +- :link: [CodeCombat](https://codecombat.com/) +- :link: [InterviewCake](https://www.interviewcake.com/) +- :link: [At Coder](https://atcoder.jp/) +- :link: [Codility](https://www.codility.com/) +- :link: [ICPC Problem Archive](https://icpc.kattis.com/) +- :link: [Codemia](https://codemia.io/)