{"id":26313383,"url":"https://github.com/strawberry-team/calendula-backend","last_synced_at":"2026-04-10T11:31:25.835Z","repository":{"id":281063476,"uuid":"944080707","full_name":"Strawberry-Team/calendula-backend","owner":"Strawberry-Team","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-14T08:52:08.000Z","size":4974,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-14T09:35:57.818Z","etag":null,"topics":["argon2","backend","backend-development","calendar-app","challenge-based-learning","db-migration","express-js","faker-js","javascript","mysql","nodejs","nodemailer","oop-principles","playwright-tests","rest-api","solid-principles","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Strawberry-Team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-06T18:51:05.000Z","updated_at":"2025-03-14T08:52:09.000Z","dependencies_parsed_at":"2025-03-06T20:31:55.271Z","dependency_job_id":null,"html_url":"https://github.com/Strawberry-Team/calendula-backend","commit_stats":null,"previous_names":["strawberry-team/calendula-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Team%2Fcalendula-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Team%2Fcalendula-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Team%2Fcalendula-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Team%2Fcalendula-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Strawberry-Team","download_url":"https://codeload.github.com/Strawberry-Team/calendula-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719399,"owners_count":20336607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argon2","backend","backend-development","calendar-app","challenge-based-learning","db-migration","express-js","faker-js","javascript","mysql","nodejs","nodemailer","oop-principles","playwright-tests","rest-api","solid-principles","swagger-ui"],"created_at":"2025-03-15T11:15:14.162Z","updated_at":"2026-04-10T11:31:25.784Z","avatar_url":"https://github.com/Strawberry-Team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌼 Calendula API\n\n## Short Description\n\n\n## Screenshots of Solution\n\n\n## Requirements and Dependencies\n- **Node.JS** \u003e= v22\n- **NPM** \u003e= v10\n- **MySQL** \u003e= 8.0\n\nBefore starting, ensure the required technologies are installed.\n\n## Database Setup\nThe database schema is provided in the `db/db.sql` file. Run the SQL commands in your MySQL database to set up the required tables.\n\n## Docker\n```bash\ndocker-compose --env-file .env.development up -d\n```\n\n## How to Run the Solution\n1. Clone this repository and move to the project directory.\n   ```bash\n   git clone \u003crepository-url\u003e\n   ```\n2. Install the dependencies.\n   ```bash\n   npm install\n   ```\n3. Configure the database connection by updating the `.env` file with your MySQL database credentials. Example:\n   ```\n   DATABASE_HOST=localhost\n   DATABASE_PORT=3306\n   DATABASE_USER=root\n   DATABASE_PASSWORD=root\n   ```\n3.1. For developers, you need to create `.env.development` and `.env.test` based on the `.env.*.example` files\n4. Log in to your MySQL. \n5. Copy the contents of the [db/schema.sql](db/schema.sql) file and execute it in MySQL. You can also execute the SQL query through the MySQL CLI. To do this, run the command `mysql -u {USER_NAME} -p \u003c db/db.sql`. You need to provide your MySQL login and password.\n6. Apply similar steps as in **step 5**, but use the data file [db/data.sql](db/data.sql).\n7. Start the server.\n   ```bash\n   npm run start\n   ```\n   \n## Mailing Service\n[Ethereal](https://ethereal.email/) is a fake SMTP service, mostly aimed at Nodemailer and EmailEngine users (but not limited to). It's a completely free anti-transactional email service where messages never get delivered.\nTo view the letter that the user will receive, you need to log in to this service using a test login and password.\n\n```text\nlogin: ricky43@ethereal.email\npassword: 4e1zbM2nxsMu2d823E\n```\n\n## REST API documentation\nThe documentation of all available endpoints can be found [http://localhost:8080/api-docs/](http://localhost:8080/api-docs/). The [Swagger](https://swagger.io/) library is used.\n\n![](docs/swagger.png)\n\n## Database Migration\n\nMigrations are possible on such environments: dev, test, and prod. Environment settings are loaded from a `./db/migration_config.json` file.\nCreate your `./db/migration_config.json` file and add the properties for the environments to it. To do this, copy `./db/migration_config.json.example` or to `./db/migration_config.json`. Then edit `./db/migration_config.json` if necessary (e.g. add a test database).\n\nNote that migrations are only possible on **existing databases**. Therefore, create your database first. Example of a database creation query to be executed in the database console:\n```sql\nCREATE DATABASE Calendula_Test;\nUSE Calendula_Test;\n```\nIn the examples of all commands below in the text `\u003cenv\u003e` is the name of the environment to perform the migration, e.g. `dev`, `test` or `prod`.\n\nThe `create` command creates a migration that loads sql file with the name \u003cmigration-name\u003e in configured migrations directory `./db/migrations`.\n```bash\nnpm run migrate:create:\u003cenv\u003e -- \u003cmigration-name\u003e\n```\nWhere `\u003cmigration-name\u003e` is the name of the migration you are creating, e.g., `update-events-categories`.\n\nThe `up` command executes the migrations of your currently configured migrations directory. More specific the up migrations are being called.\n```bash\nnpm run migrate:up:\u003cenv\u003e\n```\nThe `down` command executes the migrations of your currently configured migrations directory. More specific the down migrations are being called.\n```bash\nnpm run migrate:down:\u003cenv\u003e\n```\nThe reset command is a shortcut to execute all down migrations and literally reset all migrations which where currently done. The reset command also executes by default only the first scope.\n```bash\nnpm run migrate:reset:\u003cenv\u003e\n```\nAnswers to other questions can be found in the official [db-migrate](https://db-migrate.readthedocs.io/en/latest/) documentation.\n\n## API Testing\nCreate an `.env.test` file and add the variables for the test environment to it. To do this, copy `.env.test.example` or to `.env.test`. Then edit `.env.test` if necessary (e.g. add a test database).\n\nStart the server with the command:\n```bash\nnpm run start:test\n```\nOnce the dependencies are installed and the backend is running, you can run the tests. To do this, use the command:\nRunning all tests:\n```bash\nnpm run test\n```\nRun all tests and create a report on the results:\n```bash\nnpm run test:report\n```\nRun tests for a specific component:\n```bash\nnpx playwright test tests/api/\u003cfile_name\u003e.test.js --project=chromium --debug\n```\n\n## Additional Features\n- ...\n\n## Full Documentation\n- ...\n\n## Fake Data\nAll users has password: `$User2025`. It's fake data for presentations.\n### User emails for presentations\n* \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrawberry-team%2Fcalendula-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrawberry-team%2Fcalendula-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrawberry-team%2Fcalendula-backend/lists"}