{"id":24490364,"url":"https://github.com/armandphilippot/apcom","last_synced_at":"2025-10-02T12:30:43.540Z","repository":{"id":38197320,"uuid":"437663765","full_name":"ArmandPhilippot/apcom","owner":"ArmandPhilippot","description":"The frontend of ArmandPhilippot.com using Next JS.","archived":false,"fork":false,"pushed_at":"2025-01-21T11:35:18.000Z","size":46812,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T12:28:20.579Z","etag":null,"topics":["cypress","docker","formatjs","graphql","headless-wordpress","jest","markdown","mdx","nextjs","react-intl","wordpress"],"latest_commit_sha":null,"homepage":"https://www.armandphilippot.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArmandPhilippot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-12T21:48:13.000Z","updated_at":"2025-01-21T11:35:20.000Z","dependencies_parsed_at":"2023-02-13T02:01:50.668Z","dependency_job_id":"bcd467c5-4004-4609-b3c5-e5df12ae2567","html_url":"https://github.com/ArmandPhilippot/apcom","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fapcom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fapcom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fapcom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArmandPhilippot%2Fapcom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArmandPhilippot","download_url":"https://codeload.github.com/ArmandPhilippot/apcom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234988196,"owners_count":18918097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress","docker","formatjs","graphql","headless-wordpress","jest","markdown","mdx","nextjs","react-intl","wordpress"],"created_at":"2025-01-21T17:17:57.806Z","updated_at":"2025-10-02T12:30:43.534Z","avatar_url":"https://github.com/ArmandPhilippot.png","language":"TypeScript","readme":"# APcom\n\nThe source code of my old website.\n\n\u003e [!WARNING]\n\u003e This repository is no longer maintained!\n\u003e \n\u003e For my new website, you should take a look at: https://github.com/ArmandPhilippot/apeu\n\n## Introduction\n\nThe website is built with [Next.js](https://nextjs.org/), [WordPress](https://wordpress.org/) as headless CMS and [MDX](https://mdxjs.com/). To translate the website in French, I use [Formatjs](https://formatjs.io/). For syntax highlighting, I use [Prism](https://prismjs.com/). Others dependencies are used, feel free to take a look at `package.json`.\n\nIn addition to WordPress, the backend use:\n\n- [ACF](http://advancedcustomfields.com/)\n- [acf-post2post](https://github.com/Hube2/acf-post2post)\n- [apcom-cpt](https://github.com/ArmandPhilippot/apcom-cpt) (the custom post types used)\n- [wp-graphql](https://www.wpgraphql.com/)\n- [wp-graphql-content-stats](https://github.com/ArmandPhilippot/wp-graphql-content-stats)\n- [wp-graphql-get-extended](https://github.com/ArmandPhilippot/wp-graphql-get-extended)\n- [wp-graphql-gravatar](https://github.com/ArmandPhilippot/wp-graphql-gravatar)\n- [wp-graphql-send-mail](https://github.com/ashhitch/wp-graphql-send-mail)\n\n## Private dependencies\n\nEven if the source code and the contents are under free licenses, I don't want to see pure clones of my website. So I use a private repo as submodule to handle MDX content. Its structure looks like:\n\n```\n/\n|--assets/\n   |-- image.jpg\n   |-- image2.jpg\n|--pages/\n   |-- page1.mdx\n   |-- page2.mdx\n|--projects/\n   |-- project1.mdx\n```\n\nOther contents come from WordPress as headless CMS.\n\n## Production\n\n### First step\n\nClone this repo, then:\n\n```bash\ncp .env.example .env\n```\n\nThen, in any case, you need a reverse-proxy if you want to bind the live app to a domain.\n\n### With Docker\n\nMake sure Docker and Docker Compose are installed then, you can run: `sudo docker-compose up -d --build \u003cservice-name\u003e`.\n\n`\u003cservice-name\u003e` is optional. You don't need it the first time. However, if you want to rebuild and update only one container, it can be useful.\n\nIf you wish to use custom ports, you can edit your `.env` file and specify `APP_DOCKER_PORT` and `APP_STAGING_DOCKER_PORT` variables. By default the ports are respectively `3000` and `3200`.\n\nIf you are using Docker Swarm, you can instead use the deploy script to ensure that environment variables are loaded:\n\n```bash\nsh ./bin/deploy.sh\n```\n\n### Without Docker\n\nJust run `yarn build \u0026\u0026 yarn start`.\n\n## Development\n\n### First step\n\nClone this repo, then:\n\n```bash\ncp .env.example .env\n```\n\nAnd edit the different values.\n\n### Second step\n\nRun the development server:\n\n```bash\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result. Then, you can make your changes.\n\n### Storybook\n\nYou can search for a component or develop a new component in isolation thanks to Storybook.\n\n```bash\nyarn storybook\n```\n\nThe different components are divided into 4 categories (atomic design):\n\n- Atoms\n- Molecules\n- Organisms\n- Templates\n\nBut, to be honest, between _Molecules_ and _Organisms_ some components may be misclassified.\n\n### i18n\n\nWhen editing strings that require translation, run:\n\n```bash\nyarn run i18n:extract\n```\n\nThen copy/edit the corresponding strings inside `src/i18n/fr.json`.\n\nIf you need another language:\n\n```bash\ncp src/i18n/en.json src/i18n/[locale].json\n```\n\nReplace `[locale]` with your desired locale. Then edit this file to translate all the strings.\n\nOnce ready, run to update the website translation:\n\n```bash\nyarn run i18n:compile\n```\n\n## Testing\n\nThis project is configured to support both [Jest](https://jestjs.io/) and [Cypress](https://docs.cypress.io/) tests with [Testing Library](https://testing-library.com/).\n\nYou can run both tests with `yarn test`.\n\n### Jest\n\nThe tests are located alongside components (`src/components/`).\n\nYou can run Jest tests with `yarn test:unit`.\n\n### Cypress\n\nThe tests are located in `tests/cypress/e2e/`. All texts (to find an element) needs to be written in French since Next.js is configured to only accept this language.\n\nYou can run Cypress tests with `yarn test:e2e`.\n\n## Licenses\n\nThe source code is licensed under the [MIT license](./LICENSE).  \nThe contents are licensed under the [CC BY SA license](https://creativecommons.org/licenses/by-sa/4.0/deed.fr).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmandphilippot%2Fapcom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmandphilippot%2Fapcom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmandphilippot%2Fapcom/lists"}