DouglasNeuroInformatics / DataBank

An open-source, web-based platform for managing, versioning, and sharing tabular datasets
https://databank.douglasneuroinformatics.ca/
GNU Affero General Public License v3.0
8 stars 5 forks source link

cleanup a lot of things and build changes #114

Closed joshunrau closed 1 month ago

joshunrau commented 1 month ago

Summary by CodeRabbit

coderabbitai[bot] commented 1 month ago

[!CAUTION]

Review failed

The pull request is closed.

Walkthrough

The changes in this pull request involve significant updates across multiple files, primarily focusing on the transition from @databank/types to @databank/core for type imports, reflecting a restructuring of the codebase. Additionally, there are updates to various configuration files, including Dockerfiles and package.json files, which enhance build processes and dependency management. The introduction of TypeScript configurations and the removal of outdated files further streamline the project structure. Overall, these modifications aim to improve type safety, dependency management, and code organization.

Changes

File Change Summary
.nvmrc Node.js version updated from lts/iron to lts/jod.
api/Dockerfile Base image changed to node:lts-alpine, installation commands updated to use pnpm, and restructuring of build stages.
api/package.json Scripts updated to use TypeScript files, new start script added, and multiple dependencies updated to newer versions.
api/prisma/schema.prisma Added binaryTargets property to generator client.
api/scripts/build.ts Enhanced type safety, updated output file handling, and refined asynchronous operations.
api/scripts/dev.ts Updated nodemon invocation to use an object-based configuration.
api/src/app.module.ts Removed ValidationPipe import and provider from the module.
api/src/auth/__tests__/auth.service.spec.ts Updated import statement for types from @databank/types to @databank/core.
api/src/auth/__tests__/stubs/current-user.stub.ts Updated import source for CurrentUser type.
api/src/auth/auth.controller.ts No functional changes; minor formatting adjustment.
api/src/auth/auth.guard.ts Updated import statement for types from @databank/types to @databank/core.
api/src/auth/auth.module.ts Minor formatting change in class declaration.
api/src/auth/auth.service.ts Updated import paths for types from @databank/types to @databank/core.
api/src/auth/dto/create-account.dto.ts Validation logic changed from decorators to zod validation schema.
api/src/auth/dto/login-request.dto.ts Updated validation mechanism using zod and changed import path for LoginCredentials.
api/src/auth/dto/verify-account.dto.ts Validation changed to zod schema for the code property.
api/src/core/decorators/route-access.decorator.ts Updated import for UserRole type.
api/src/core/decorators/validate-dto.decorator.ts File removed.
api/src/datasets/datasets.controller.ts Updated import paths for types from @databank/types to @databank/core.
api/src/datasets/datasets.service.ts Updated import paths for types from @databank/types to @databank/core.
api/src/docs.ts Updated contact information and API version in documentation setup.
api/src/i18n/i18n.module.ts Minor formatting change in class declaration.
api/src/i18n/i18n.service.ts Updated import for Locale type.
api/src/mail/mail.module.ts Minor formatting change in class declaration.
api/src/main.ts Updated import for NestExpressApplication and added shutdown hooks.
api/src/projects/projects.controller.ts Updated import paths for types from @databank/types to @databank/core.
api/src/projects/projects.service.ts Updated import paths for types from @databank/types to @databank/core.
api/src/tabular-data/tabular-data.service.ts Updated import paths for types from @databank/types to @databank/core.
api/src/typings/express.d.ts Updated import paths for types from @databank/types to @databank/core.
api/src/users/__tests__/users.service.spec.ts Updated test cases for asynchronous behavior.
core/package.json New package declaration for @databank/core created.
core/src/index.ts Exported PermissionLevel type for broader accessibility.
core/tsconfig.json New TypeScript configuration file created.
docker-compose.yaml Minor formatting changes for consistency.
package.json Updated package manager version, added engine requirements, and modified dependencies.
pnpm-workspace.yaml Added dependencies and updated package list.
types/package.json File removed.
types/tsconfig.json File removed.
web/.gitignore File removed.
web/.storybook/main.ts Updated type declaration for config and added new story entry.
web/Caddyfile Configuration block removed.
web/Dockerfile Significant restructuring and updates to the build process.
web/index.html Updated document title and simplified body tag.
web/package.json Updated dependency versions and removed several packages.
web/src/components/ErrorPage.tsx Minor formatting adjustment in className.
web/src/components/Heading.tsx Replaced twMerge with cn for class name management.
web/src/components/Logo.tsx Replaced clsx with cn for class name management.
web/src/features/auth/components/ConfirmEmailCodeInput.tsx Updated class name management and validation logic for pasted input.
web/src/features/auth/components/LoginForm.tsx Updated import for LoginCredentials type.
web/src/features/auth/pages/ConfirmEmailPage.tsx Updated import paths for types from @databank/types to @databank/core.
web/src/features/auth/pages/LoginPage.tsx Updated import paths for types and modified navigation logic.
web/src/features/dashboard/pages/DashboardPage.tsx Minor reordering of class names in JSX.
web/src/features/dataset/components/DatasetCard.tsx Updated import paths for DatasetCardProps type.
web/src/features/dataset/components/DatasetPagination.tsx Updated import paths and reordered class names in JSX.
web/src/features/dataset/components/DatasetTable.tsx Updated import paths and reordered class names in JSX.
web/src/features/dataset/components/ManagerCard.tsx Updated import for TUser type.
web/src/features/dataset/components/PublicDatasetCard.tsx Updated import paths for DatasetCardProps type.
web/src/features/dataset/pages/EditDatasetInfoPage.tsx Updated import paths and reordered class names in JSX.
web/src/features/dataset/pages/ViewDatasetsPage.tsx Updated import paths for DatasetCardProps type.
web/src/features/dataset/pages/ViewOneDatasetPage.tsx Updated import paths for types.
web/src/features/dataset/pages/ViewOnePublicDatasetPage.tsx Updated import paths for types.
web/src/features/dataset/pages/ViewPublicDatasetsPage.tsx Updated import paths for DatasetCardProps type.
web/src/features/landing/components/Hero.tsx Minor reordering of class names in JSX.
web/src/features/landing/components/LandingHeader.tsx Replaced clsx with cn for class name management.
web/src/features/projects/components/UserCard.tsx Updated import paths for TUser type.
web/src/features/projects/pages/AddProjectDatasetColumnPage.tsx Updated import paths for types.
web/src/features/projects/pages/AddProjectDatasetPage.tsx Updated import paths for DatasetCardProps type.
web/src/features/projects/pages/EditProjectInfoPage.tsx Updated import paths and reordered class names in JSX.
web/src/features/projects/pages/ManageProjectDatasetPage.tsx Updated import paths for types.
web/src/features/projects/pages/ViewOneProjectDatasetPage.tsx Updated import paths for types.
web/src/features/projects/pages/ViewOneProjectPage.tsx Updated import paths for DatasetCardProps type.
web/src/features/setup/components/SetupForm.tsx Updated import paths for SetupDto type.
web/src/features/setup/pages/SetupPage.tsx Updated import paths for SetupDto type.
web/src/features/shared/pages/SharedPage.tsx Updated import paths for DatasetInfo type.
web/src/stores/auth-store.ts Updated import paths for CurrentUser type.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant API
    participant Database

    User->>API: Request to create account
    API->>Database: Save user data
    Database-->>API: Confirmation of save
    API-->>User: Account created successfully

    User->>API: Request to login
    API->>Database: Validate user credentials
    Database-->>API: User validation result
    API-->>User: Login successful, return token

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.