Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .agents/Backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@
## Specifications
- Dont use any in backend logic use unknown, use null instead of undefined
- Just follow instructions in prompt
- Domain contains logic, application cordinates this logic and infra and infra just provides services

# Module structure
**Each module contain at least the next structure**
- domain
- interfaces
- model
- repository
- objects
- types
- events
- errors
- application
- services
- Dtos
- helpers
- providers
-provider_name

## Domain specifications
- All entities extends from Entity abstract class (Check Entity structure)
Expand Down Expand Up @@ -55,6 +73,7 @@
- CheckList item can not be bigger than 1000 characters
- Attachment name can not be bigger than 1000 characters
- Category name can not be bigger than 1000 characters
- If an invitation is accepted but the inviter doesnt have permissions to invite anymore then the invitation is invalid, if the project is closed or deleted also is invalid the invitation
- Oncascade actions does not generate an event for each change, generate a global event that describes that was performed, the on cascade actions are move a list or a task to another position and reorganize

## Allowed Attachments
Expand All @@ -69,4 +88,7 @@
- Member: Can create resources, comment or add member according to project config
- Auditor: Just can observe a project


# Pull request structure
- Title: type header
- Why: explain why is neede this changes
- What was made: Explain what was made at current pull request
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CoreError from '../../../shared/core/errors/CoreError';
export default class AccountAlreadyExists extends CoreError {
constructor(info?: unknown);
}
//# sourceMappingURL=AccountAlreadyExists.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions backend/dist/modules/account/core/errors/InvalidAccount.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CoreError from '../../../shared/core/errors/CoreError';
export default class InvalidAccount extends CoreError {
constructor(info?: unknown);
}
//# sourceMappingURL=InvalidAccount.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions backend/dist/modules/account/core/errors/InvalidAccount.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions backend/dist/modules/account/core/events/AccountCreated.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import DomainEvent from '../../../shared/core/events/DomainEvent';
import type DateTime from '../../../shared/core/objects/DateTime';
import type IdEntity from '../../../shared/core/objects/IdEntity';
import type AccountParams from '../interfaces/AccountParams';
export default class AccountCreated extends DomainEvent {
constructor(key: string, date: DateTime, actor: IdEntity, ownerId: IdEntity, idEntity: IdEntity, params: AccountParams);
}
//# sourceMappingURL=AccountCreated.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions backend/dist/modules/account/core/events/AccountCreated.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions backend/dist/modules/account/core/interfaces/AccountParams.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default interface AccountParams {
id: string;
email: string;
isPrimary: boolean;
name: string;
userId: string;
provider: string;
profileImage?: string | null;
createdAt?: Date;
}
//# sourceMappingURL=AccountParams.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions backend/dist/modules/account/core/interfaces/AccountParams.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion backend/dist/modules/account/core/model/Account.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
export default class Account {
import Entity from '../../../shared/core/model/Entity';
import IdAccount from '../objects/IdAccount';
import IdEntity from '../../../shared/core/objects/IdEntity';
import None from '../../../shared/core/objects/None';
import type AccountParams from '../interfaces/AccountParams';
import Email from '../../../shared/core/objects/Email';
import AccountName from '../objects/AccountName';
import Url from '../../../shared/core/objects/URL';
export default class Account extends Entity {
private email;
private name;
private owner;
private isPrimary;
private createdAt;
private provider;
private profileImage;
private constructor();
static create(id: IdAccount, email: Email, name: AccountName, provider: string, profileImage: Url | None, owner: IdEntity, isPrimary: boolean): Account;
static fromPrimitives(params: AccountParams): Account;
toPrimitives(): AccountParams;
getProfileImage(): Url | None;
getEmail(): Email;
getName(): AccountName;
}
//# sourceMappingURL=Account.d.ts.map
2 changes: 1 addition & 1 deletion backend/dist/modules/account/core/model/Account.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 59 additions & 1 deletion backend/dist/modules/account/core/model/Account.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/dist/modules/account/core/model/Account.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions backend/dist/modules/account/core/objects/AccountName.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ValueObject from '../../../shared/core/objects/ValueObject';
export default class AccountName extends ValueObject {
private readonly name;
constructor(name: string);
getName(): string;
toPrimitives(): string;
}
//# sourceMappingURL=AccountName.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions backend/dist/modules/account/core/objects/AccountName.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions backend/dist/modules/account/core/objects/IdAccount.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import IdEntity from '../../../shared/core/objects/IdEntity';
export default class IdAccount extends IdEntity {
constructor(id: string);
}
//# sourceMappingURL=IdAccount.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions backend/dist/modules/account/core/objects/IdAccount.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/dist/modules/account/core/objects/IdAccount.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions backend/dist/modules/account/core/types/Account.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type AccountId = string;
export type AccountPayload = Record<string, unknown>;
//# sourceMappingURL=Account.d.ts.map
1 change: 1 addition & 0 deletions backend/dist/modules/account/core/types/Account.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions backend/dist/modules/account/core/types/Account.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/dist/modules/account/core/types/Account.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/dist/modules/invitation/core/model/Invitation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class Invitation extends Entity {
private constructor();
static create(key: string, id: IdInvitation, host: IdEntity, projectId: IdEntity, guest: Email): Invitation;
cancel(key: string): void;
accept(key: string): void;
accept(): void;
delete(key: string): void;
static fromPrimitives(params: InvitationParams): Invitation;
toPrimitives(): InvitationParams;
Expand Down
Loading
Loading