-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:RezaRahemtola/Area into tom/are-412…
…-update-darklight-web-theme
- Loading branch information
Showing
203 changed files
with
18,181 additions
and
860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
# AREA | ||
# Area | ||
|
||
## Team | ||
Area is an automation platform, available as a web app and a mobile app, that allows you to | ||
combine Actions and REactions [from a large range of integrations]((https://rezarahemtola.notion.site/Area-Integrations-f382af642ddb49d4b5a52e3fc307bfd9)) to fit your needs. | ||
|
||
### Frontend | ||
You can learn more about the project [in our documentation](https://docs.area.rezar.fr) 😄 | ||
|
||
| [<img src="https://github.com/Tomi-Tom.png?size=85" width=85><br><sub>Tom BARITEAU--PETER</sub>](https://github.com/Tomi-Tom) | [<img src="https://github.com/axel-denis.png?size=85" width=85><br><sub>Axel DENIS</sub>](https://github.com/axel-denis) | ||
|:---:| :---: | | ||
## Getting started 🚀 | ||
|
||
### Backend | ||
To start using our amazing platform, go to [`https://area.rezar.fr`](https://area.rezar.fr) and setup your account to start creating workflows! | ||
|
||
| [<img src="https://github.com/Croos3r.png?size=85" width=85><br><sub>Dorian MOY</sub>](https://github.com/Croos3r) | [<img src="https://github.com/EdenComp.png?size=85" width=85><br><sub>Florian LAUCH</sub>](https://github.com/EdenComp) | ||
|:---:| :---: | | ||
If you want a more detailed guide of the different options to use Area (including self-hosted 💻), [check this page](https://docs.area.rezar.fr/#/general/getting-started). | ||
|
||
### Full-stack & Project manager | ||
| [<img src="https://github.com/RezaRahemtola.png?size=85" width=85><br><sub>Reza Rahemtola</sub>](https://github.com/RezaRahemtola) | ||
| :---: | | ||
## How it works 🤔 | ||
|
||
If you're here for the technical details, we got you covered too! | ||
You can dive into the architecture documentation explaining how we are using [microservices](https://docs.area.rezar.fr/#/architecture/workers) | ||
and a [supervisor](https://docs.area.rezar.fr/#/architecture/supervisor) to create Docker containers on-demand. | ||
|
||
> 💡 Some pretty standard parts may not be covered, but don't hesitate to reach out by creating an issue on [our repository](https://github.com/RezaRahemtola/Area), we'll be happy to help you! | ||
## Contribute 🤝 | ||
|
||
If you want to go a step forward and participate in the development of features to enhance Area, we'd be glad to onboard you 🥇 | ||
|
||
Reach out to [`[email protected]`](mailto:[email protected]) and we'll get back to you in a few business days! | ||
|
||
## Team ❤️ | ||
|
||
| [<img src="https://github.com/Croos3r.png?size=85" width=85><br><sub>Dorian MOY</sub>](https://github.com/Croos3r)<br><sub>Backend</sub> | [<img src="https://github.com/EdenComp.png?size=85" width=85><br><sub>Florian LAUCH</sub>](https://github.com/EdenComp)<br><sub>Microservices</sub> | [<img src="https://github.com/Tomi-Tom.png?size=85" width=85><br><sub>Tom BARITEAU-PETER</sub>](https://github.com/Tomi-Tom)<br><sub>Mobile</sub> | [<img src="https://github.com/axel-denis.png?size=85" width=85><br><sub>Axel DENIS</sub>](https://github.com/axel-denis)<br><sub>Mobile</sub> | [<img src="https://github.com/RezaRahemtola.png?size=85" width=85><br><sub>Reza RAHEMTOLA</sub>](https://github.com/RezaRahemtola)<br><sub>Web & DevOps</sub> | ||
|:---:| :---: | :---: | :---: | :---: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { forwardRef, Inject, Injectable } from "@nestjs/common"; | ||
import { JobData } from "../grpc/grpc.dto"; | ||
import { JobsType } from "../types/jobs"; | ||
import { JobsService } from "./jobs.service"; | ||
import { WorkflowToggleParams } from "../types/jobParams"; | ||
import { WorkflowsService } from "../workflows/workflows.service"; | ||
import { GrpcService } from "../grpc/grpc.service"; | ||
import { JobsIdentifiers } from "../types/jobIds"; | ||
|
||
@Injectable() | ||
export class BackJobsService { | ||
constructor( | ||
@Inject(forwardRef(() => GrpcService)) private readonly grpcService: GrpcService, | ||
@Inject(forwardRef(() => JobsService)) private readonly jobsService: JobsService, | ||
private readonly workflowsService: WorkflowsService, | ||
) {} | ||
|
||
async toggleWorkflow(params: WorkflowToggleParams, newState: boolean) { | ||
const jobName = `area-${newState ? "enable" : "disable"}-workflow`; | ||
const workflow = await this.workflowsService.getWorkflowByNameAndOwner(params.workflowName, params.ownerId); | ||
|
||
if (workflow.active === newState) return; | ||
try { | ||
await this.workflowsService.toggleWorkflow(workflow.id, newState, params.ownerId); | ||
await this.grpcService.onAction({ | ||
name: jobName, | ||
identifier: `area-${newState ? "enable" : "disable"}-workflow-${params.ownerId}`, | ||
params: {}, | ||
}); | ||
} catch (e) { | ||
await this.grpcService.onError({ | ||
identifier: JobsIdentifiers[jobName](params), | ||
error: e.message, | ||
isAuthError: false, | ||
}); | ||
} | ||
} | ||
|
||
async executeBackJob(job: JobData) { | ||
const jobType: JobsType = job.name as JobsType; | ||
const params = await this.jobsService.convertParams(jobType, job.params); | ||
|
||
switch (jobType) { | ||
case "area-disable-workflow": | ||
await this.toggleWorkflow(params as WorkflowToggleParams, false); | ||
break; | ||
case "area-enable-workflow": | ||
await this.toggleWorkflow(params as WorkflowToggleParams, true); | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { JobsType } from "../types/jobs"; | ||
|
||
export const AREAS_WITHOUT_GRPC: JobsType[] = [ | ||
"area-disable-workflow", | ||
"area-enable-workflow", | ||
"area-on-account-connect", | ||
"area-on-action", | ||
"area-on-workflow-create", | ||
"area-on-workflow-toggle", | ||
"facebook-on-status-create", | ||
"linear-on-comment-create", | ||
"linear-on-issue-create", | ||
"linear-on-issue-update", | ||
"linear-on-project-create", | ||
"linear-on-project-update", | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.