Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5db3ffc
Created basic Senaca service with environment documented
Nov 26, 2020
bd9e24d
Updated status
Nov 26, 2020
2432c12
Updated documentation and TODO data
Nov 26, 2020
6534339
Cleaned basics
Nov 26, 2020
f575740
Cleaned up images
Nov 26, 2020
1bc1ca4
Create route middlewares to listen to endpoints outputting parsed values
Nov 26, 2020
9b5d24e
Build model to represent data using mongoose
Nov 27, 2020
9dbe04f
Create database infrastructure
Nov 27, 2020
24b7aed
Fixed failing tests because of missing file
Nov 27, 2020
5570c77
Added default createOrUpdate with create only path
Nov 27, 2020
591cc97
Added cleaning the snapshots from the build
Nov 28, 2020
ce0f952
Minor refactoring
Nov 28, 2020
a26ef2e
Renamed server folder to be src
Nov 28, 2020
3c5ade9
Added todo
Nov 28, 2020
866d079
Update courses test
Nov 28, 2020
97b1476
Cleaned tests
Nov 28, 2020
26870c2
Prepare tests for next scenario
Nov 28, 2020
1067a2a
Mental notes for tomorrow
Nov 28, 2020
a2b53b2
Update courses to update too
Nov 28, 2020
7a88cd0
Refactor
Nov 28, 2020
0a4cdf9
Started adding stats to the models
Nov 29, 2020
b151014
Define todo items
Nov 29, 2020
f57686e
Refactored database to seperarte db drop
Nov 29, 2020
ebba94a
refactored createOrUpdate to deal with aggregates
Nov 29, 2020
ff21463
Implemented the route logic getting courses
Nov 29, 2020
568af95
Fixed some TODO whcih included:
Nov 29, 2020
abfd1d8
Fixed inconsistent test experience
Nov 29, 2020
c728333
Documentation on architecture and design decisions
Nov 29, 2020
5fca601
Fixed broken image link
Nov 29, 2020
2383506
Apdated last bit of documentation
Nov 29, 2020
be6d9a8
Last README fix
Nov 29, 2020
63ab66c
Added last TODO's to finish off before submitting
Nov 30, 2020
9479776
Added serverless to run express and documented
Nov 30, 2020
86f49c0
Refactored last TODO
Nov 30, 2020
834f6f7
Last note fixed
Nov 30, 2020
b3d2c86
Add a joke in the summary using fastify
Nov 30, 2020
b376cc7
Fixed typo
Nov 30, 2020
53ad00e
Last coverage note
Nov 30, 2020
a0067a2
Fixed image path issue
Nov 30, 2020
a6ff1e1
Refactored bad name from code review
Dec 3, 2020
8991bfa
Removed promise from code review
Dec 3, 2020
a5a7c5e
Styling issues resolved
Dec 3, 2020
9ed05ed
Cleaned course infrastructure and added a note to clean error handling
Dec 4, 2020
30500fe
Created all response types needed
Dec 4, 2020
05fd271
Fixed 201
Dec 4, 2020
b019c02
Created structured http responses
Dec 4, 2020
73e880d
Created application error types
Dec 4, 2020
73be129
Added error handling
Dec 4, 2020
08e2571
Fixed the bug
Dec 4, 2020
79e4e4f
Checkin passing tests
Dec 5, 2020
a3c666a
Updated course domain layer
Dec 5, 2020
a802306
Refactor database
Dec 5, 2020
fb35b29
Refactored errors
Dec 5, 2020
b1608a0
Used the most efficient way of gettign the values
Dec 5, 2020
c91376d
Refactored ,issing tests and error in output
Dec 5, 2020
b8fa774
Finally created custom error handler
Dec 5, 2020
eff84f9
Updated changes reflected in documentation
Dec 5, 2020
a7c895c
Update vscode settings
Dec 5, 2020
81f4917
Made launch more generic
Dec 5, 2020
44cfe8f
Indentation fixed
Dec 5, 2020
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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PORT=3000
MONGODB_URI="mongodb://localhost:27017/SenecaStats?safe=true"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@ dist
.tern-port

# Distributed files generated
test-express/dist-server/
dist-server/

32 changes: 32 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
},
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
}
]
}
247 changes: 232 additions & 15 deletions README.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
✔ Setup basic `express` application @critical @done(20-11-26 15:48)
✔ Clean up and prepare the application so that it is ready for `Senaca requirments` @high @done(20-11-26 15:50)
✔ Add the `SWAGGER` into the definition so the swagger UI can test the endpoint @high @done(20-11-26 15:50)
✔ Start developing endpoints so they get values @high @done(20-11-29 19:47)
✔ Start developing by domain an using an In-memory mongo database @high @done(20-11-29 19:47)
✔ Start configuring a `serverless.yaml` for AWS deployment script @high @done(20-11-30 08:34)
✔ Start `PUML Architecture` design and descptions @low @done(20-11-30 07:14)
✔ Issue Remove the snapshots being outputted @done(20-11-28 18:13)
✔ Disconnect and drop database when express closing @critical @done(20-11-29 19:46)
✔ Seperate the disconnect from the drop @high @done(20-11-29 19:35)
✔ Add database onto all the exported functions @low @done(20-11-29 19:46)
✔ Remove the `private database properties` exposing too much internal information @high @done(20-11-29 12:17)
✔ Increase Jest Test times for some tests that potentially can run longer than 5 seconds @high @done(20-11-29 20:14)
✔ Refactor code to be cleaner - Clean engineering practises @done(20-11-30 08:41)
✔ Refactor bad name createOrUpdate to createOrUpdateCourse @high @done(20-12-03 15:39)
✔ Error Handling very primitive - https://www.joyent.com/node-js/production/design/errors @critical @done(20-12-05 14:54)
✔ Refactor error handling to Middleware @done(20-12-05 17:26)
✔ Refactor use of index.js making it hard to debug or find stuff @high @done(20-12-05 16:49)
✔ Refactor course domain @done(20-12-05 14:56)
✔ Refactor Database @done(20-12-05 15:19)
✔ Refactor errors @done(20-12-05 15:20)
22 changes: 22 additions & 0 deletions architecture.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@startuml "Vincent Farah Test for Seneca"
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
' uncomment the following line and comment the first to use locally
' !include C4_Container.puml

' LAYOUT_TOP_DOWN()
LAYOUT_LEFT_RIGHT()

'LAYOUT_AS_SKETCH
LAYOUT_WITH_LEGEND()

Person(api_user, "Web Application User")

Container_Boundary(c1, "stats services solution by Vincent Farah"){
Container(web_app, "Web Application", "Node, AWS ApiGateway", "Allows stats to be generated for users related to courses and session statistics")
ContainerDb(nosql, "NoSQL Data Store", "MongoDB In Memory-Database", "Stores courses and sessions data ephemerally")
}

Rel(api_user, web_app, "Uses", "HTTPS")
Rel(web_app, nosql, "Reads from and Writes to", "MongoDB wire protocol, port 27017")

@enduml
2 changes: 1 addition & 1 deletion test-express/jest.config.js → jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ module.exports = {
// setupFiles: [],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],
setupFilesAfterEnv: ['./setupTests.js'],

// The number of seconds after which a test is considered as slow and reported as such in the results.
// slowTestThreshold: 5,
Expand Down
File renamed without changes.
Loading