Skip to content

Latest commit

 

History

History
90 lines (58 loc) · 2.41 KB

File metadata and controls

90 lines (58 loc) · 2.41 KB

Contributing

CodeDuet is still a very early-stage project, thus the codebase is rapidly changing. Although the code was forked from the DYAD project, both project have different goals, product road maps and long term trajectories. This code base will remain free + open source and if there is a need to create a more premium product with a PRO plan (or something similar) the spin off product will be seperately maintained. The goal of CodeDuet AI Studio is allow people to learn more about AI development and create awesome + exciting products without vendor lock-in.

Before opening a pull request, please open an issue and discuss whether the change makes sense in CodeDuet. Ensuring a cohesive user experience sometimes means we can't include every possible feature or we need to consider the long-term design of how we want to support a feature area.

For a high-level overview of how CodeDuet works, please see the Architecture Guide. Understanding the architecture will help ensure your contributions align with the overall design of the project.

Development

CodeDuet is an Electron app.

Install dependencies:

npm install

Create the userData directory (required for database)

# Unix/macOS/Linux:
mkdir -p userData

# Windows PowerShell (run only if folder doesn't exist):
mkdir userData

# Windows Command Prompt (run only if folder doesn't exist):
md userData

Apply migrations:

# Generate and apply database migrations
npm run db:generate
npm run db:push

Run locally:

npm start

Setup

If you'd like to contribute a pull request, we highly recommend setting the pre-commit hooks which will run the formatter and linter before each git commit. This is a great way of catching issues early on without waiting to run the GitHub Actions for your pull request.

Simply run this once in your repo:

npm run init-precommit

Testing

Unit tests

npm test

E2E tests

Build the app for E2E testing:

npm run pre:e2e

Note: you only need to re-build the app when changing the app code. You don't need to re-build the app if you're just updating the tests.

Run the whole e2e test suite:

npm run e2e

Run a specific test file:

npm run e2e e2e-tests/context_manage.spec.ts

Update snapshots for a test:

npm run e2e e2e-tests/context_manage.spec.ts -- --update-snapshots