Skip to content

Commit

Permalink
feat: first implementation of pathway design
Browse files Browse the repository at this point in the history
  • Loading branch information
collettemathieu committed Sep 13, 2024
1 parent 70ebc0d commit 7a093ab
Show file tree
Hide file tree
Showing 155 changed files with 3,461 additions and 232 deletions.
52 changes: 52 additions & 0 deletions .detective/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"scopes": [
"libs/pathway-design/server/pathway/business/src/lib/entities",
"libs/pathway-design/server/pathway/business/src/lib/events",
"libs/pathway-design/server/pathway/business/src/lib/factories",
"libs/pathway-design/server/pathway/business/src/lib/ports",
"libs/pathway-design/server/pathway/business/src/lib/value-objects",
"libs/pathway-design/server/pathway/infrastructure/src/lib/persistence/common",
"libs/pathway-design/server/pathway/infrastructure/src/lib/persistence/initialize/in-memory",
"libs/pathway-design/server/pathway/interface-adapters/src/lib/initialize/controller",
"libs/pathway-design/server/pathway/interface-adapters/src/lib/initialize/dtos",
"libs/pathway-design/server/pathway/presenters/src/lib/toJson",
"apps/pathway-design/server/src/app",
"libs/pathway-design/server/pathway/application/src/lib/initialize/command",
"libs/pathway-design/server/pathway/application/src/lib/initialize/usecase",
"libs/pathway-design/server/pathway/application/src/lib/initialize/service"
],
"groups": [
"apps/pathway-design/server/src",
"apps/pathway-design/server",
"apps/pathway-design",
"apps",
"libs/pathway-design/server/pathway/application/src/lib/initialize",
"libs/pathway-design/server/pathway/application/src/lib",
"libs/pathway-design/server/pathway/application/src",
"libs/pathway-design/server/pathway/application",
"libs/pathway-design/server/pathway/business/src/lib",
"libs/pathway-design/server/pathway/business/src",
"libs/pathway-design/server/pathway/business",
"libs/pathway-design/server/pathway/infrastructure/src/lib/persistence/initialize",
"libs/pathway-design/server/pathway/infrastructure/src/lib/persistence",
"libs/pathway-design/server/pathway/infrastructure/src/lib",
"libs/pathway-design/server/pathway/infrastructure/src",
"libs/pathway-design/server/pathway/infrastructure",
"libs/pathway-design/server/pathway/interface-adapters/src/lib/initialize",
"libs/pathway-design/server/pathway/interface-adapters/src/lib",
"libs/pathway-design/server/pathway/interface-adapters/src",
"libs/pathway-design/server/pathway/interface-adapters",
"libs/pathway-design/server/pathway/presenters/src/lib",
"libs/pathway-design/server/pathway/presenters/src",
"libs/pathway-design/server/pathway/presenters",
"libs/pathway-design/server/pathway",
"libs/pathway-design/server",
"libs/pathway-design",
"libs"
],
"entries": [],
"teams": {
"example-team-a": ["John Doe", "Jane Doe"],
"example-team-b": ["Max Muster", "Susi Sorglos"]
}
}
1 change: 1 addition & 0 deletions .detective/hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3601514f0819bed357d1b14c042a0d872079a336
483 changes: 483 additions & 0 deletions .detective/log

Large diffs are not rendered by default.

24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,29 @@ jobs:
with:
bun-version: latest

# Set NX_BASE and NX_HEAD explicitly for pull requests
- name: Set NX_BASE and NX_HEAD for PR
if: github.event_name == 'pull_request'
run: |
echo "NX_BASE=$GITHUB_BASE_REF" >> $GITHUB_ENV
echo "NX_HEAD=$GITHUB_HEAD_REF" >> $GITHUB_ENV
echo "NX_BASE="$NX_BASE
echo "NX_HEAD="$NX_HEAD
# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
# - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build"
# Set NX_BASE and NX_HEAD for direct commits
- name: Set NX_BASE and NX_HEAD for direct commits
if: github.event_name == 'push'
run: |
BASE_SHA=$(git rev-parse HEAD~1)
HEAD_SHA=$(git rev-parse HEAD)
echo "NX_BASE=$BASE_SHA" >> $GITHUB_ENV
echo "NX_HEAD=$HEAD_SHA" >> $GITHUB_ENV

- run: bun install --no-cache
- uses: nrwl/nx-set-shas@v4
- run: bun run commitlint --from=$NX_BASE --to=$NX_HEAD
- run: bun run format:check

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: bun nx-cloud record -- echo Hello World
- run: bun nx affected -t lint test build
- run: bun nx affected -t lint test build test-feature --base=$NX_BASE --head=$NX_HEAD --parallel --maxParallel=3
4 changes: 2 additions & 2 deletions .hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# #!/bin/sh
# echo "Checking with commitlint...."
# bun run commitlint --edit $1
echo "Checking with commitlint...."
bun run commitlint --edit $1
28 changes: 28 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
7 changes: 5 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"recommendations": [
"nrwl.angular-console",
"alexkrechik.cucumberautocomplete",
"biomejs.biome",
"esbenp.prettier-vscode",
"github.vscode-github-actions",
"nrwl.angular-console",
"oven.bun-vscode",
"biomejs.biome"
"tamasfe.even-better-toml",
]
}
20 changes: 15 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
{
"bun.runtime": "$HOME/.bun/bin/bun",
"bun.debugTerminal.enabled": true,
"bun.debugTerminal.stopOnEntry": false,
"editor.formatOnSave": true,
"bun.runtime": "$HOME/.bun/bin/bun",
"cucumberautocomplete.steps": [
"apps/**/*.ts",
"libs/**/*.ts"
],
"cucumberautocomplete.strictGherkinCompletion": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"quickfix.biome": "explicit",
"source.organizeImports": "explicit",
"source.organizeImports.biome": "explicit"
},
"editor.defaultFormatter": "biomejs.biome"
}
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#05ef3c"
},
"workbench.tree.indent": 15,
"workbench.tree.renderIndentGuides": "always"
}
86 changes: 35 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,60 @@
# Bewoak

<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
## Unlock the Potential of Scientific Learning

**This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev)**
Welcome to Bewoak, the innovative platform designed to empower researchers by deepening their knowledge through carefully crafted educational pathways. Whether you're an established academic or an emerging scientist, Bewoak offers a structured and engaging way to explore and master complex scientific domains.

## Integrate with editors
## Why Bewoak?

Enhance your Nx experience by installing [Nx Console](https://nx.dev/nx-console) for your favorite editor. Nx Console
provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and
comes with a LSP for Vim users.
In the fast-evolving world of scientific research, staying updated and continuously learning is crucial. Bewoak bridges the gap by providing a platform where researchers can:

## Nx plugins and code generators
* Explore: Dive into a wide range of scientific fields such as astronomy, biology, chemistry, computer science, mathematics, physics, and more.
* Learn: Follow expertly curated educational pathways created by fellow researchers in your domain.
* Progress: Track your learning journey, mark your progress, and gain a comprehensive understanding of your chosen subject.

Add Nx plugins to leverage their code generators and automated, inferred tasks.
## Key Features

```
# Add plugin
npx nx add @nx/react
### Structured Learning Pathways

# Use code generator
npx nx generate @nx/react:app demo
* Curated by Experts: Pathways are created by researchers with deep expertise in their fields.
* Sequential Learning: Follow a series of articles, each linked to valuable resources such as books, scientific publications, podcasts, and videos.
* Flexible Review: Revisit previously read articles anytime to reinforce your knowledge.

# Run development server
npx nx serve demo
### Seamless User Experience

# View project details
npx nx show project demo --web
```
* Easy Registration: Join the platform through a simple, recommendation-based registration process.
* Personalized Progress Tracking: Monitor your advancement through each pathway, ensuring a clear view of what’s next on your learning journey.
* Favorite Pathways: Save and organize your favorite pathways for quick access.

Run `npx nx list` to get a list of available plugins and whether they have generators. Then run `npx nx list <plugin-name>` to see what generators are available.
### Dynamic Content Management

Learn more about [code generators](https://nx.dev/features/generate-code) and [inferred tasks](https://nx.dev/concepts/inferred-tasks) in the docs.
* For Authors: Create, update, and manage your educational pathways effortlessly. Ensure your content is always current and relevant.
* For Learners: Receive notifications whenever a pathway you’re following is updated, with guidance on where to continue.

## Running tasks
### Integrated Scientific Domain Data

To execute tasks with Nx use the following syntax:
* Comprehensive Classification: Leverage up-to-date scientific domain data to explore pathways relevant to your interests.
* Third-Party Integration: Access domain information seamlessly via a robust API.

```
npx nx <target> <project> <...options>
```
## Join the Bewoak Community

You can also run multiple targets:
Become part of a growing network of researchers dedicated to advancing scientific knowledge. Share your expertise, learn from peers, and contribute to a collective journey of discovery and innovation.

```
npx nx run-many -t <target1> <target2>
```
Start your learning adventure with Bewoak today!

..or add `-p` to filter specific projects
## Getting Started

```
npx nx run-many -t <target1> <target2> -p <proj1> <proj2>
```
1. Sign Up: Begin your journey by registering on the Bewoak platform. Ensure you have a recommendation from an existing user.
2. Explore Pathways: Search and discover educational pathways that match your scientific interests.
3. Track Your Progress: Follow pathways, mark articles as read, and see your progression clearly.
4. Create and Share: If you're an expert, contribute by creating pathways and sharing your knowledge with the community.

Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/features/run-tasks).
## Contributing to Bewoak

## Set up CI!
We welcome contributions from researchers and developers alike. Whether you have suggestions for new features, improvements, or want to report issues, please check out our contribution guidelines.

Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further.
## License

- [Set up remote caching](https://nx.dev/features/share-your-cache)
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution)
- [Learn more how to setup CI](https://nx.dev/recipes/ci)
Bewoak is licensed under the MIT License. See the LICENSE file for more details.

## Explore the project graph

Run `npx nx graph` to show the graph of the workspace.
It will show tasks that you can run with Nx.

- [Learn more about Exploring the Project Graph](https://nx.dev/core-features/explore-graph)

## Connect with us!

- [Join the community](https://nx.dev/community)
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Follow us on Twitter](https://twitter.com/nxdevtools)
Discover. Learn. Progress. Join Bewoak and enhance your scientific journey today!
30 changes: 0 additions & 30 deletions apps/bewoak-api/project.json

This file was deleted.

23 changes: 0 additions & 23 deletions apps/bewoak-api/src/app/app.controller.spec.ts

This file was deleted.

13 changes: 0 additions & 13 deletions apps/bewoak-api/src/app/app.controller.ts

This file was deleted.

11 changes: 0 additions & 11 deletions apps/bewoak-api/src/app/app.module.ts

This file was deleted.

22 changes: 0 additions & 22 deletions apps/bewoak-api/src/app/app.service.spec.ts

This file was deleted.

8 changes: 0 additions & 8 deletions apps/bewoak-api/src/app/app.service.ts

This file was deleted.

Loading

0 comments on commit 7a093ab

Please sign in to comment.