create development guide

remove deps badge

correct mongo connection string and driver update

seed data for developer environment, database as docker image
This commit is contained in:
2025-11-20 09:48:56 +01:00
committed by Owen Rees
parent 28f3bf69c6
commit 67e97b6ca0
11 changed files with 26142 additions and 43 deletions
+2 -3
View File
@@ -1,3 +1,2 @@
NEXT_PUBLIC_URL=http://localhost:3000 MONGODB_URI=mongodb://localhost:27017/
NEXT_PUBLIC_MATOMO_URL= NEXT_PUBLIC_URL=http://localhost:3000
NEXT_PUBLIC_MATOMO_SITE_ID=
+29
View File
@@ -0,0 +1,29 @@
# Contributing
When contributing to this repository, please first discuss the change you wish to make via a GitHub issue.
## Development Environment Setup
### Prerequisites
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)
- [Docker](https://docs.docker.com/engine/install/)
### Setup
1. Fork the repository
2. Clone your fork locally
3. Run `yarn` to install dependencies
4. Run `docker-compose up` to start the MongoDB database and seed it with test data
5. Run `yarn dev` to start the development server
The test data is not persisted between restarts. Create a Docker volume if you wish for this to be the case.
### Branching
- We use the [GitHub Flow](https://www.gitkraken.com/learn/git/best-practices/git-branch-strategy#github-flow-considerations) branching strategy.
- Use `feature/feature-name` as your branch name.
- Non-feature branches are allowed, but please give a clear name to your branch such as `hotfix/fix-bug`
## Pull Request Process
1. Squash all your commits into a single commit before pushing your branch
2. Give a clear overview of your changes in the commit message
3. When opening a PR, give a clear overview of what your changes are and why
4. Wait for review and approval
-1
View File
@@ -4,7 +4,6 @@
![GitHub](https://img.shields.io/github/license/therealowenrees/echecsfrance?style=for-the-badge) ![GitHub](https://img.shields.io/github/license/therealowenrees/echecsfrance?style=for-the-badge)
![Vercel](https://vercelbadge.vercel.app/api/therealowenrees/echecsfrance?style=for-the-badge) ![Vercel](https://vercelbadge.vercel.app/api/therealowenrees/echecsfrance?style=for-the-badge)
![Depfu](https://img.shields.io/depfu/dependencies/github/TheRealOwenRees/echecsfrance?style=for-the-badge)
## Un site web indiquant sur une carte les prochains tournois d'échecs de la [FFE](http://www.echecs.asso.fr/) ## Un site web indiquant sur une carte les prochains tournois d'échecs de la [FFE](http://www.echecs.asso.fr/)
+1 -2
View File
@@ -4,13 +4,12 @@
![GitHub](https://img.shields.io/github/license/therealowenrees/echecsfrance?style=for-the-badge) ![GitHub](https://img.shields.io/github/license/therealowenrees/echecsfrance?style=for-the-badge)
![Vercel](https://vercelbadge.vercel.app/api/therealowenrees/echecsfrance?style=for-the-badge) ![Vercel](https://vercelbadge.vercel.app/api/therealowenrees/echecsfrance?style=for-the-badge)
![Depfu](https://img.shields.io/depfu/dependencies/github/TheRealOwenRees/echecsfrance?style=for-the-badge)
## A website displaying upcoming chess tournaments for the [FFE](http://www.echecs.asso.fr/) on a map ## A website displaying upcoming chess tournaments for the [FFE](http://www.echecs.asso.fr/) on a map
## Tech Stack ## Tech Stack
This website is built in Typescript using: This website is built in TypeScript using:
- [Next.js](https://nextjs.org/) - [Next.js](https://nextjs.org/)
- [Tailwind](https://tailwindcss.com/) - [Tailwind](https://tailwindcss.com/)
+9
View File
@@ -0,0 +1,9 @@
services:
mongodb:
image: mongo:8.2.2
container_name: echecsfrance-db-dev
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- ./mongo/init:/docker-entrypoint-initdb.d
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
mongoimport \
--db tournamentsFranceDB \
--collection clubs \
--file /docker-entrypoint-initdb.d/clubs.json \
--jsonArray
+13552
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
mongoimport \
--db tournamentsFranceDB \
--collection tournaments \
--file /docker-entrypoint-initdb.d/tournaments.json \
--jsonArray
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -36,7 +36,7 @@
"leaflet.markercluster": "^1.5.3", "leaflet.markercluster": "^1.5.3",
"leaflet.smooth_marker_bouncing": "3.0.3", "leaflet.smooth_marker_bouncing": "3.0.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mongodb": "^6.19.0", "mongodb": "^7.0.0",
"next": "^14.2.3", "next": "^14.2.3",
"next-auth": "^5.0.0-beta.16", "next-auth": "^5.0.0-beta.16",
"next-intl": "^3.3.2", "next-intl": "^3.3.2",
+36 -36
View File
@@ -1570,10 +1570,10 @@
"@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14" "@jridgewell/sourcemap-codec" "^1.4.14"
"@mongodb-js/saslprep@^1.1.9": "@mongodb-js/saslprep@^1.3.0":
version "1.3.0" version "1.3.2"
resolved "https://registry.yarnpkg.com/@mongodb-js/saslprep/-/saslprep-1.3.0.tgz#75bb770b4b0908047b6c6ac2ec841047660e1c82" resolved "https://registry.yarnpkg.com/@mongodb-js/saslprep/-/saslprep-1.3.2.tgz#51e5cad2f24b8759702d9cc185da0a3ef3784bad"
integrity sha512-zlayKCsIjYb7/IdfqxorK5+xUMyi4vOKcFy10wKJYc63NSdKI8mNME+uJqfatkPmOSMMUiojrL58IePKBm3gvQ== integrity sha512-QgA5AySqB27cGTXBFmnpifAi7HxoGUeezwo6p9dI03MuDB6Pp33zgclqVb6oVK3j6I9Vesg0+oojW2XxB59SGg==
dependencies: dependencies:
sparse-bitfield "^3.0.3" sparse-bitfield "^3.0.3"
@@ -2047,10 +2047,10 @@
resolved "https://registry.yarnpkg.com/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz#1306dbfa53768bcbcfc95a1c8cde367975581859" resolved "https://registry.yarnpkg.com/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz#1306dbfa53768bcbcfc95a1c8cde367975581859"
integrity sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA== integrity sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==
"@types/whatwg-url@^11.0.2": "@types/whatwg-url@^13.0.0":
version "11.0.5" version "13.0.0"
resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-11.0.5.tgz#aaa2546e60f0c99209ca13360c32c78caf2c409f" resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-13.0.0.tgz#2b11e32772fd321c0dedf4d655953ea8ce587b2a"
integrity sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ== integrity sha512-N8WXpbE6Wgri7KUSvrmQcqrMllKZ9uxkYWMt+mCSGwNc0Hsw9VQTW7ApqI4XNrx6/SaM2QQJCzMPDEXE058s+Q==
dependencies: dependencies:
"@types/webidl-conversions" "*" "@types/webidl-conversions" "*"
@@ -2501,10 +2501,10 @@ browserslist@^4.23.0, browserslist@^4.23.3:
node-releases "^2.0.18" node-releases "^2.0.18"
update-browserslist-db "^1.1.0" update-browserslist-db "^1.1.0"
bson@^6.10.4: bson@^7.0.0:
version "6.10.4" version "7.0.0"
resolved "https://registry.yarnpkg.com/bson/-/bson-6.10.4.tgz#d530733bb5bb16fb25c162e01a3344fab332fd2b" resolved "https://registry.yarnpkg.com/bson/-/bson-7.0.0.tgz#2ee7ac8296d61739a8d3d1799724a10d9f8afa8d"
integrity sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng== integrity sha512-Kwc6Wh4lQ5OmkqqKhYGKIuELXl+EPYSCObVE6bWsp1T/cGkOCBN0I8wF/T44BiuhHyNi1mmKVPXk60d41xZ7kw==
buffer-from@^1.0.0: buffer-from@^1.0.0:
version "1.1.2" version "1.1.2"
@@ -4484,22 +4484,22 @@ minimist@^1.2.0, minimist@^1.2.6:
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
mongodb-connection-string-url@^3.0.0: mongodb-connection-string-url@^7.0.0:
version "3.0.1" version "7.0.0"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz#c13e6ac284ae401752ebafdb8cd7f16c6723b141" resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-7.0.0.tgz#aad7291d191c52e3b5e2765eb9d218b6efcad655"
integrity sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg== integrity sha512-irhhjRVLE20hbkRl4zpAYLnDMM+zIZnp0IDB9akAFFUZp/3XdOfwwddc7y6cNvF2WCEtfTYRwYbIfYa2kVY0og==
dependencies: dependencies:
"@types/whatwg-url" "^11.0.2" "@types/whatwg-url" "^13.0.0"
whatwg-url "^13.0.0" whatwg-url "^14.1.0"
mongodb@^6.19.0: mongodb@^7.0.0:
version "6.19.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-6.19.0.tgz#d28df0ae4cb3bea4381206e2d9efc3c7b77531fe" resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-7.0.0.tgz#33b381dc9fdca208a38ea03340d57244c776573f"
integrity sha512-H3GtYujOJdeKIMLKBT9PwlDhGrQfplABNF1G904w6r5ZXKWyv77aB0X9B+rhmaAwjtllHzaEkvi9mkGVZxs2Bw== integrity sha512-vG/A5cQrvGGvZm2mTnCSz1LUcbOPl83hfB6bxULKQ8oFZauyox/2xbZOoGNl+64m8VBrETkdGCDBdOsCr3F3jg==
dependencies: dependencies:
"@mongodb-js/saslprep" "^1.1.9" "@mongodb-js/saslprep" "^1.3.0"
bson "^6.10.4" bson "^7.0.0"
mongodb-connection-string-url "^3.0.0" mongodb-connection-string-url "^7.0.0"
mrmime@^2.0.0: mrmime@^2.0.0:
version "2.0.0" version "2.0.0"
@@ -4988,7 +4988,7 @@ prop-types@15, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-
object-assign "^4.1.1" object-assign "^4.1.1"
react-is "^16.13.1" react-is "^16.13.1"
punycode@^2.1.0, punycode@^2.3.0: punycode@^2.1.0, punycode@^2.3.1:
version "2.3.1" version "2.3.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
@@ -5846,12 +5846,12 @@ tr46@^1.0.1:
dependencies: dependencies:
punycode "^2.1.0" punycode "^2.1.0"
tr46@^4.1.1: tr46@^5.1.0:
version "4.1.1" version "5.1.1"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469" resolved "https://registry.yarnpkg.com/tr46/-/tr46-5.1.1.tgz#96ae867cddb8fdb64a49cc3059a8d428bcf238ca"
integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw== integrity sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==
dependencies: dependencies:
punycode "^2.3.0" punycode "^2.3.1"
ts-api-utils@^1.3.0: ts-api-utils@^1.3.0:
version "1.3.0" version "1.3.0"
@@ -6076,12 +6076,12 @@ webpack-sources@^1.4.3:
source-list-map "^2.0.0" source-list-map "^2.0.0"
source-map "~0.6.1" source-map "~0.6.1"
whatwg-url@^13.0.0: whatwg-url@^14.1.0:
version "13.0.0" version "14.2.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-13.0.0.tgz#b7b536aca48306394a34e44bda8e99f332410f8f" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-14.2.0.tgz#4ee02d5d725155dae004f6ae95c73e7ef5d95663"
integrity sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig== integrity sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==
dependencies: dependencies:
tr46 "^4.1.1" tr46 "^5.1.0"
webidl-conversions "^7.0.0" webidl-conversions "^7.0.0"
whatwg-url@^7.0.0: whatwg-url@^7.0.0: