We will be posing hundreds of coding challenges to hundreds of users. Each user can post their own solution to any number of challenges, resulting in possibly thousands of challenge solutions. Creating hundreds or thousands of separate repos seems unwieldy, so we'd like to keep the entire project under a monorepo and limit read-access on a per-file or per-directory basis for each user. Each user should only be able to see their own files, while the owners of the repo should be able to see all files.
An example repo structure would look like this:
challenges/
├── challenge1/
│ ├── challenge1-user1/
│ ├── challenge1-user2/
│ └── challenge1-user5/
│ ...
├── challenge2/
│ ├── challenge2-user2/
│ └── challenge2-user3/
│ ...
├── challenge3/
│ ├── challenge3-user1/
│ ├── challenge3-user3/
│ └── challenge3-user4/
│ ...
├── ...
...
Also interested if other people have had to deal with similar problems and their solutions.