diff --git a/.gitignore b/.gitignore index b00b59b..279a3a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules outputs +pid diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb7b0fa --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# react-cv + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v1.0.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. diff --git a/bun.lockb b/bun.lockb index a2a457d..d2fcec4 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/cv.tsx b/cv.tsx index 1d30565..71ce516 100644 --- a/cv.tsx +++ b/cv.tsx @@ -1,29 +1,196 @@ -import React from 'react'; -import { Page, Text, View, Document, StyleSheet } from '@react-pdf/renderer'; -import ReactPDF from '@react-pdf/renderer'; -import fs from "fs" +import { Page, Text, View, Document, Link } from "@react-pdf/renderer"; +import ReactPDF from "@react-pdf/renderer"; +import fs from "fs"; +import { createTw } from "react-pdf-tailwind"; -const styles = StyleSheet.create({ - page: { - flexDirection: 'row', - backgroundColor: '#E4E4E4' - }, - section: { - margin: 10, - padding: 10, - flexGrow: 1 - } +type Experience = { + company: string + position: string + location: string + from: Date + to: Date + description: string + technologies: string[] +} + +const tw = createTw({ }); -const MyDocument = () => ( +const link = "no-underline text-red-50" +const section = "w-full flex flex-col m-4" + +const divider = + + + + + +const github = + github/ivandimitrov8080 +const upwork = + upwork/freelancers/idimitrov +const resume = + idimitrov.dev +const email = + ivan@idimitrov.dev + +const tech = { + android: [ + "Android", + "Android Studio", + ], + java: [ + "Java", + "JPA", + "Hibernate", + "Spring Framework", + "Spring Boot", + "Lombok", + "Spring MVC", + "Thymeleaf", + "JSP", + "JSTL", + "XML", + "Spring Security", + "OAuth2", + "H2", + "Spring Boot Actuator", + ], + web: [ + "JavaScript", + "TypeScript", + "React", + "HTML", + "CSS" + ], + api: [ + "REST", + "SOAP", + ], + db: [ + "MySQL", + "PostgreSQL" + ], + linux: [ + "Linux", + "Bash", + "coreutils", + "Ubuntu", + "CentOS", + "RHEL", + "SSH", + "iptables", + "systemd", + "vim", + "Monit", + "CLI", + ], + hybris: [ + "SAP hybris", + "ZK Framework", + ], + payment: [ + "PayPal", + "Adyen", + "V12", + "Wells Fargo Open Banking APIs", + ] +} + +const techKeys = [...Object.keys(tech)] as const + +const cnetTech: string[] = techKeys + .filter(e => !e.includes("hybris")) + .filter(e => !e.includes("payment")) + // @ts-ignore + .map(e => tech[e]).flat() +const raTech: string[] = techKeys + // @ts-ignore + .map(e => tech[e]).flat() + + +const experience = ({ + company, + position, + location, + from, + to, + description, + technologies +}: Experience) => ( + + + {position} + at + {company}, {location} + from + {from.toDateString()} + to + {to.toDateString()} + + + {description} + + + {technologies.map(t => ( + + + {t} + + ))} + + +) + +const Links = () => ( + + {github} + {upwork} + {email} + {resume} + +) + +const Experience = () => ( + + Experience + {experience({ + company: "Central Net", + position: "Software Developer", + location: "Blagoevgrad, Bulgaria", + from: new Date("May 2016"), + to: new Date("May 2020"), + description: "Developed a full-stack web app helping students book exams, browse resources, see events, news and more.", + technologies: cnetTech + })} + {experience({ + company: "RA Creative", + position: "Software Developer", + location: "Nottingham, UK", + from: new Date("Dec 2020"), + to: new Date("20 Jan 2023"), + description: "Worked on seven international eCommerce web apps serving customers in the US and Europe.", + technologies: raTech + })} + +) + +const Intro = () => ( + + Ivan K. Dimitrov + Software Developer + + +) + +const CV = () => ( - - - Section #1 - - - Section #2 - + + + {divider} + ); @@ -35,5 +202,5 @@ if (!fs.existsSync(outDir)) { fs.mkdirSync(outDir, { recursive: true }) } -ReactPDF.render(, `${outDir}/${pname}.pdf`); +ReactPDF.render(, `${outDir}/${pname}.pdf`); diff --git a/flake.nix b/flake.nix index d7d6455..2214524 100644 --- a/flake.nix +++ b/flake.nix @@ -22,11 +22,23 @@ nativeBuildInputs = with pkgs; [ nodejs_20 bun + inotify-tools ]; + shellHook = '' + echo "$$" > ./pid + monitor() { + while true; do + inotifywait -e modify ${pname}.tsx > /dev/null 2>&1 + make + pkill -HUP mupdf + done + } + monitor > /dev/null 2>&1 & + ''; in { devShells.default = pkgs.mkShell { - inherit pname buildInputs nativeBuildInputs; + inherit pname buildInputs nativeBuildInputs shellHook; }; packages.default = pkgs.stdenv.mkDerivation { inherit buildInputs nativeBuildInputs pname version src; diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..f67b2c6 --- /dev/null +++ b/index.ts @@ -0,0 +1 @@ +console.log("Hello via Bun!"); \ No newline at end of file diff --git a/package.json b/package.json index a19f289..f67494e 100644 --- a/package.json +++ b/package.json @@ -1 +1,18 @@ -{ "dependencies": { "@react-pdf/renderer": "^3.1.14", "@types/node": "^20.9.0", "@types/react": "^18.2.37", "react": "^18.2.0" } } \ No newline at end of file +{ + "name": "cv", + "module": "cv.tsx", + "type": "module", + "devDependencies": { + "bun-types": "latest" + }, + "peerDependencies": { + "typescript": "^5.0.0" + }, + "dependencies": { + "@react-pdf/renderer": "^3.1.14", + "@types/node": "^20.9.0", + "@types/react": "^18.2.37", + "react": "^18.2.0", + "react-pdf-tailwind": "^2.1.0" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7556e1d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "module": "esnext", + "target": "esnext", + "moduleResolution": "bundler", + "moduleDetection": "force", + "allowImportingTsExtensions": true, + "noEmit": true, + "composite": true, + "strict": true, + "downlevelIteration": true, + "skipLibCheck": true, + "jsx": "react-jsx", + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + "types": [ + "bun-types" // add Bun global + ] + } +}