Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #119

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3bed751
Refactor: rename questions to challenges
Akalanka47000 Nov 3, 2023
9a2e7ac
Feat: initiated event endpoints
Akalanka47000 Nov 4, 2023
80beb6d
Feat: added event and speaker cruds
Akalanka47000 Nov 4, 2023
a9cfd3b
Refactor: config variables
Akalanka47000 Nov 4, 2023
e877d10
Feat: added coupon cruds
Akalanka47000 Nov 4, 2023
c869982
Create issues-add-labels.yaml
chamodshehanka Nov 6, 2023
8b328b3
Update issues-add-labels.yaml
chamodshehanka Nov 6, 2023
72cac75
Update issues-add-labels.yaml
chamodshehanka Nov 6, 2023
fca2005
Update issues-add-labels.yaml
chamodshehanka Nov 6, 2023
c1c17e3
Update issues-add-labels.yaml
chamodshehanka Nov 6, 2023
9af5291
Update README.md
chamodshehanka Nov 11, 2023
28a5d20
Feat: added ticket request and get current ticket endpoints
Akalanka47000 Nov 12, 2023
01b0d67
Merge branch 'main' of https://github.com/gdgsrilanka/bashaway-backen…
Akalanka47000 Nov 12, 2023
860e916
Docs: updated readme
Akalanka47000 Nov 12, 2023
d748327
Update quality-checks.yml
KaveeshaG Nov 12, 2023
8b3c2a2
Update quality-checks.yml
KaveeshaG Nov 12, 2023
9b225a3
Feat: added added ticket approval
Akalanka47000 Nov 12, 2023
59578a0
Merge branch 'main' of https://github.com/gdgsrilanka/bashaway-backen…
Akalanka47000 Nov 12, 2023
316a708
Update README.md
chamodshehanka Nov 12, 2023
3b6f025
Feat: added coupon creation on submission grading
Akalanka47000 Nov 12, 2023
3deb63e
Fix: won coupon discount calculation
Akalanka47000 Nov 12, 2023
4c4b4da
Merge branch 'main' of https://github.com/gdgsrilanka/bashaway-backen…
Akalanka47000 Nov 12, 2023
a889aba
Fix: quality check workflow
Akalanka47000 Nov 12, 2023
05908d2
Feat: added ticket info endpoint to dashboard
Akalanka47000 Nov 12, 2023
9a084d1
Feat: added social links to user model
Akalanka47000 Nov 12, 2023
1dcc6ce
Feat: added tags and visual settings to event
Akalanka47000 Nov 12, 2023
9b05664
Fix: made event tags required during creation
Akalanka47000 Nov 12, 2023
da19afe
Feat: added identify middleware
Akalanka47000 Nov 12, 2023
d7327b6
Fix: event sort and unused code cleanup
Akalanka47000 Nov 12, 2023
e2c41d8
Feat: added breakpoint support to event image
Akalanka47000 Nov 12, 2023
d5c911e
Feat: added social links to speaker schema
Akalanka47000 Nov 12, 2023
8e76cd2
Docs: updated readme
Akalanka47000 Nov 18, 2023
81a6b39
Chore: updated email template logos
Akalanka47000 Nov 18, 2023
1150b14
Merge branch 'main' of https://github.com/gdgsrilanka/bashaway-backend
Akalanka47000 Nov 18, 2023
90c6e5d
Fix: email template logo alt attributes
Akalanka47000 Nov 18, 2023
e2b125e
Merge branch 'main' into development
Akalanka47000 Nov 18, 2023
5f82d0f
Fix: email template logo sizing
Akalanka47000 Nov 18, 2023
a7722eb
Feat: added slug and guidelines to event model
Akalanka47000 Nov 19, 2023
e933c10
Feat: added event search by slug
miyurugunarathna Nov 19, 2023
282ccd9
Feat: integrated payhere
Akalanka47000 Nov 20, 2023
e188157
Merge branch 'main' into development
Akalanka47000 Nov 20, 2023
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
20 changes: 15 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
PORT=3001
MONGO_URI=mongodb://localhost:27017/bashaway

APP_ENV=staging

MONGO_URI=mongodb://localhost:27017/tech-events

JWT_EXPIRE=30
JWT_REFRESH_EXPIRE=30
JWT_SECRET=
BCRYPT_SALT_ROUNDS=
APP_ENV=staging

MAIL_HOST=smtp.gmail.com
MAIL_USER=
MAIL_PASSWORD=
APP_DOMAIN=http://localhost:3001
NODE_TLS_REJECT_UNAUTHORIZED=0

APP_DOMAIN=http://localhost:3001
FRONTEND_DOMAIN=http://localhost:3000
ADMIN_FRONTEND_DOMAIN=http://localhost:3000

API_ACCESS_KEY=

GITHUB_ACCESS_TOKEN=
SCOREKEEPER_REPO_OWNER=
SCOREKEEPER_REPO_NAME=

AZURE_CHALLENGE_UPLOAD_SAS_TOKEN=
AZURE_SOLUTION_DOWNLOAD_SAS_TOKEN=
AZURE_SOLUTION_DOWNLOAD_SAS_TOKEN=

PAYHERE_BASE_URL=
PAYHERE_MERCHANT_SECRET=
PAYHERE_MERCHANT_ID=
PAYHERE_AUTHORIZATION_CODE=
19 changes: 19 additions & 0 deletions .github/workflows/issues-add-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Add Labels

on:
issues:
types: opened

jobs:
add_labels:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: add labels
uses: actions-ecosystem/action-add-labels@v1
with:
labels: |
Backend
Team/Dev :man_technologist:
44 changes: 0 additions & 44 deletions .github/workflows/production-deploy-azure.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v3

- name: Run commitlint 🟩
uses: sliit-foss/actions/quality-checks/commitlint@main
uses: gdg-srilanka/actions/quality-checks/commitlint@main

lint:
name: Enforce ESLint rules
Expand All @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@v3

- name: Run linter 📢
uses: sliit-foss/actions/quality-checks/linter@main
uses: gdg-srilanka/actions/quality-checks/linter@main

format:
name: Format code
Expand All @@ -44,4 +44,4 @@ jobs:
uses: actions/checkout@v3

- name: Run formatter 🧹
uses: sliit-foss/actions/quality-checks/formatter@main
uses: gdg-srilanka/actions/quality-checks/formatter@main
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
<br/>

<p align="center">
<img src="https://github.com/sliit-foss/bashaway-official/assets/73662613/c15f7a94-592b-410f-b581-c98d25a9ca42" width="420" alt="Bashaway Logo"/>
<img src="https://github.com/gdgsrilanka/techevents-portal/assets/73662613/aedb59e2-7aab-4ac2-8146-6bf82ac84044" width="420" alt="Techevents Logo"/>
</p>

<br/>

<p align="center">
<a aria-label="SLIIT FOSS logo" href="https://sliitfoss.org">
<img src="https://img.shields.io/badge/Made_by_the_SLIIT_FOSS_Community-blue">
<a aria-label="GDG Sri Lanka Logo" href="https://gdg.community.dev/gdg-sri-lanka/">
<img src="https://img.shields.io/badge/Made_by_GDG_Sri_Lanka-blue">
</a>
<a aria-label="License" href="https://github.com/sliit-foss/bashaway-backend/blob/main/LICENSE">
<a aria-label="License" href="https://github.com/gdgsrilanka/techevents-api/blob/main/LICENSE">
<img alt="" src="https://img.shields.io/badge/License-MIT-yellow.svg">
</a>
</p>

<br/>

Bashaway is a competitive coding event where the participants must automate a given task using scripting. The maximum allowed group size is 4 and the primary language to be used is Bash. Certain other languages may be permitted depended upon the context of the question.
An all in one platform for tech events within Sri Lanka. This repository contains the backend API for the Tech Events platform.

## API Documentation

- [Postman collection](https://documenter.getpostman.com/view/13842706/2s9XxsWcDC)
- [Wiki](https://github.com/sliit-foss/bashaway-backend/wiki)
- [Postman collection](https://documenter.getpostman.com/view/13842706/2s9YXk3gUP)
- [Wiki](https://github.com/gdgsrilanka/techevents-api/wiki)

## Deployments

- [Production](https://api.bashaway.sliitfoss.org) (Not always running)
- [Staging](https://api.staging.bashaway.sliitfoss.org)
- [Production](https://api.techevents.lk)
- [Staging](https://api.staging.techevents.lk)

## Getting started

Expand All @@ -39,10 +39,8 @@ Bashaway is a competitive coding event where the participants must automate a gi
## Commit messages

- We follow conventional commits during our development workflow as a good practice. More information can be found at their official [documentation](https://www.conventionalcommits.org/en/v1.0.0-beta.4/#examples)
- Refer the [commitlint.config.js](https://github.com/sliit-foss/bashaway-backend/blob/main/commitlint.config.cjs) file for a full list of supported commit message prefixes
- Refer the [commitlint.config.js](https://github.com/gdgsrilanka/techevents-api/blob/main/commitlint.config.cjs) file for a full list of supported commit message prefixes

## Additional tools

- This project is bootstrapped with [Lefthook](https://evilmartians.com/opensource/lefthook), [Eslint](https://eslint.org/) and [Prettier](https://prettier.io/). Please make good use of them.

<br/>
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bashaway-backend",
"version": "2.1.0",
"name": "tech-events-api",
"version": "0.0.0",
"description": "Backend",
"main": "dist/app.js",
"scripts": {
Expand All @@ -17,24 +17,25 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/sliit-foss/bashaway-backend.git"
"url": "git+https://github.com/gdgsrilanka/tech-events-api.git"
},
"author": "SLIIT FOSS",
"author": "GDG Sri Lanka",
"license": "MIT",
"bugs": {
"url": "https://github.com/sliit-foss/bashaway-backend/issues"
"url": "https://github.com/gdgsrilanka/tech-events-api/issues"
},
"homepage": "https://github.com/sliit-foss/bashaway-backend#readme",
"homepage": "https://github.com/gdgsrilanka/tech-events-api#readme",
"dependencies": {
"@faker-js/faker": "8.1.0",
"@sliit-foss/functions": "2.2.4",
"@sliit-foss/http-logger": "1.1.2",
"@sliit-foss/module-logger": "1.1.5",
"@sliit-foss/service-connector": "1.2.4",
"@sliit-foss/service-connector": "2.0.0",
"bcryptjs": "2.4.3",
"celebrate": "15.0.1",
"compression": "1.7.4",
"cors": "2.8.5",
"dot-object": "2.1.4",
"express": "4.18.1",
"express-http-context": "1.2.4",
"express-rate-limit": "6.5.1",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

10 changes: 5 additions & 5 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { omit, pick } from 'lodash';
import { default as connectDB } from '@/database';
import { errorHandler, queryMapper, responseInterceptor } from '@/middleware';
import { default as routes } from '@/routes/index.routes';
import { PORT } from './config';
import { APPLICATION } from './constants';

require('dotenv').config();

Expand Down Expand Up @@ -46,7 +48,7 @@ app.use(express.json({ limit: '1mb' }));

app.use(express.urlencoded({ extended: true }));

app.get('/', (_, res) => res.status(200).json({ message: 'Bashaway Server Up and Running' }));
app.get('/', (_, res) => res.status(200).json({ message: `${APPLICATION} Server Up and Running` }));

app.use(context.middleware);

Expand Down Expand Up @@ -77,10 +79,8 @@ connectDB();

global.__basedir = __dirname;

const port = process.env.PORT || 3000;

app.listen(port, (err) => {
app.listen(PORT, (err) => {
if (!err) {
logger.info(`Bashaway server successfully started on port ${port}`);
logger.info(`${APPLICATION} server successfully started on port ${PORT}`);
}
});
Loading
Loading