Skip to content

Commit

Permalink
Initial project setup:
Browse files Browse the repository at this point in the history
- Firebase (functions, hosting, firestore)
- React
- Typescript
- Bulma (scss)

At this stage it's possible to add schools (only with "name" field), and list them.
  • Loading branch information
BenjaVR committed Nov 19, 2018
0 parents commit dfe65af
Show file tree
Hide file tree
Showing 38 changed files with 24,351 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "stud-plan"
}
}
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# IDE
.idea
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"files.associations": {
".firebaserc": "jsonc",
"firestore.indexes.json": "jsonc",
"tslint.json": "jsonc"
},
"json.schemas": [
{
"fileMatch": [
"web/**/manifest.json"
],
"url": "http://json.schemastore.org/web-manifest"
}
]
}
26 changes: 26 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"%RESOURCE_DIR%\" run lint",
"npm --prefix \"%RESOURCE_DIR%\" run build"
]
},
"hosting": {
"public": "web/build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
14 changes: 14 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Example:
//
// "indexes": [
// {
// "collectionId": "widgets",
// "fields": [
// { "fieldPath": "foo", "mode": "ASCENDING" },
// { "fieldPath": "bar", "mode": "DESCENDING" }
// ]
// }
// ]
"indexes": []
}
11 changes: 11 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write;
}

match /schools/{schoolId} {
allow write: if request.resource.data.name.size() > 0
}
}
}
6 changes: 6 additions & 0 deletions functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Compiled JavaScript files
**/*.js
**/*.js.map

# Typescript v1 declaration files
typings/
Loading

0 comments on commit dfe65af

Please sign in to comment.