npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

arena-split-core

v0.0.23-SNAPSHOT

Published

## Typescript application following Domain Driven Design principles

Downloads

6

Readme

Arena Split Core

Typescript application following Domain Driven Design principles

Development

To start the project you need to have the following tools installed:

  • Node.js v20
  • NPM v10
  • WebStorm or any other IDE that supports Typescript
  • Git

Installation of the repository

  1. Clone the repo

    git clone [email protected]:carlosupreme/arena-split-core.git
  2. Navigate to the arena-split-core folder

    cd arena-split-core
  3. Inmediately after cloning the repository you need to move to the develop branch

    git checkout develop
  4. And create your own branch

    git checkout -b my-new-feature
  5. Install the dependencies

    npm install
  6. Run the tests

    npm run test
  7. Build the application to ensure everything is working fine

    npm run build

Developing in the Core

Once you have the application running you can start developing in the core. The core is the main application that will be used by other applications like the api or the web application.

When you are developing in the core application you need to follow these steps

Do Test Driven Development please, write the test first and then write the code to make the test pass

Deployment

Suppose that you made a new feature (with tests).

You can deploy the core application to npm and then other developers that are using the core will have your changes.

Just run the following commands:

Obviously the tests should be passing before deploying, so ensure that

npm run test 

If you added new classes or interfaces that should be exported, ensure that the corresponding index.ts file is updated with the new exports

This index files has the following format:

Just the layer application and domain.

Starts with the bounded context name and - and then the layer name (domain or application).

Let's say that you added a new Domain value object called UserName to the friends bounded context, you should update the friends-domain.ts file

// friends-domain.ts before
export * from "./value-objects/Email";
export * from "./value-objects/FullName";
// friends-domain.ts after
export * from "./value-objects/Email";
export * from "./value-objects/FullName";
export * from "./value-objects/UserName"; // added

Then run the following command to build the application

npm run build

The successful output should look like this:

> [email protected] build
> tsup

CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.1.0
CLI Using tsup config: /home/carlos/programacion/arena-aplit/core/package.json
CLI Target: es2020
CLI Cleaning output folder
CJS Build start
ESM Build start
ESM dist/index.mjs     8.00 KB
ESM dist/index.mjs.map 17.60 KB
ESM ⚡️ Build success in 44ms
CJS dist/index.js     9.77 KB
CJS dist/index.js.map 17.83 KB
CJS ⚡️ Build success in 45ms
DTS Build start
DTS ⚡️ Build success in 1475ms
DTS dist/index.d.ts  5.64 KB
DTS dist/index.d.mts 5.64 KB

After that, change the package.json version to a new version, following our versioning guide.

package.json before

{
  "version": "1.1.0"
}

package.json after

{
  "version": "1.2.0"
}

And then publish it to npm

npm publish --tag latest

If everything goes well commit your branch and push it to the remote repository

git add . &&  git commit -m 'new feature' && git push origin my-new-feature

Finally open a pull request to the develop branch and wait for the approval

Thank you for contributing to the core application 🎉🤗