Skip to content

Commit 4c5d88a

Browse files
author
Flatlogic Bot
committed
Initial commit
0 parents  commit 4c5d88a

File tree

173 files changed

+14483
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+14483
-0
lines changed

.browserslistrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 2,
4+
"trailingComma": "all",
5+
"quoteProps": "as-needed",
6+
"jsxSingleQuote": true,
7+
"bracketSpacing": true,
8+
"bracketSameLine": false,
9+
"arrowParens": "always"
10+
}

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:14
2+
3+
# Create app directory
4+
WORKDIR /usr/src/app
5+
6+
# Install app dependencies
7+
# A wildcard is used to ensure both package.json AND package-lock.json are copied
8+
# where available (npm@5+)
9+
COPY package*.json ./
10+
11+
RUN yarn install
12+
# If you are building your code for production
13+
# RUN npm ci --only=production
14+
15+
# Bundle app source
16+
COPY . .
17+
18+
EXPOSE 3000
19+
CMD [ "yarn", "start" ]

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Angular-Material-Admin-Full
2+
3+
## This project was generated by Flatlogic Platform.
4+
5+
## To start the project:
6+
7+
Install dependencies via npm or yarn
8+
9+
```shell
10+
yarn install
11+
```
12+
13+
Run development server
14+
15+
```shell
16+
yarn start
17+
```
18+
19+
## Support
20+
21+
For any additional information please refer to [Flatlogic homepage](https://flatlogic.com).
22+
23+
## To start the project with Docker:
24+
25+
## Description:
26+
27+
The project contains the **docker folder** and the `Dockerfile`.
28+
29+
The `Dockerfile` is used to Deploy the project to Google Cloud.
30+
31+
The **docker folder** contains a couple of helper scripts:
32+
33+
- `docker-compose.yml` (all our services: web, backend, db are described here)
34+
- `start-backend.sh` (starts backend, but only after the database)
35+
- `wait-for-it.sh` (imported from https://github.com/vishnubob/wait-for-it)
36+
37+
> To avoid breaking the application, we recommend you don't edit the following files: everything that includes the **docker folder** and `Dokerfile`.
38+
39+
## Run services:
40+
41+
1. Install docker compose (https://docs.docker.com/compose/install/)
42+
43+
2. Move to `docker` folder. All next steps should be done from this folder.
44+
45+
`cd docker`
46+
47+
3. Make executables from `wait-for-it.sh` and `start-backend.sh`:
48+
49+
`chmod +x start-backend.sh && chmod +x wait-for-it.sh`
50+
51+
4. Download dependend projects for services.
52+
53+
5. Review the docker-compose.yml file. Make sure that all services have Dockerfiles. Only db service doesn't require a Dockerfile.
54+
55+
6. Make sure you have needed ports (see them in `ports`) available on your local machine.
56+
57+
7. Start services:
58+
59+
7.1. With an empty database `rm -rf data && docker-compose up`
60+
61+
7.2. With a stored (from previus runs) database data `docker-compose up`
62+
63+
8. Check http://localhost:3000
64+
65+
9. Stop services:
66+
67+
9.1. Just press `Ctr+C`

angular.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": "e08c68e1-44a7-45ac-b4bd-9a6e0380538f"
5+
},
6+
"version": 1,
7+
"newProjectRoot": "projects",
8+
"projects": {
9+
"angular-material-admin": {
10+
"projectType": "application",
11+
"schematics": {},
12+
"root": "",
13+
"sourceRoot": "src",
14+
"prefix": "app",
15+
"architect": {
16+
"build": {
17+
"builder": "@angular-devkit/build-angular:browser",
18+
"options": {
19+
"outputPath": "build",
20+
"index": "src/index.html",
21+
"main": "src/main.ts",
22+
"polyfills": "src/polyfills.ts",
23+
"tsConfig": "tsconfig.app.json",
24+
"aot": true,
25+
"assets": ["src/favicon.ico", "src/assets"],
26+
"styles": [
27+
"./node_modules/font-awesome/scss/font-awesome.scss",
28+
"./node_modules/ngx-toastr/toastr.css",
29+
"src/custom-theme.scss"
30+
],
31+
"scripts": []
32+
},
33+
"configurations": {
34+
"production": {
35+
"fileReplacements": [
36+
{
37+
"replace": "src/environments/environment.ts",
38+
"with": "src/environments/environment.prod.ts"
39+
}
40+
],
41+
"optimization": true,
42+
"outputHashing": "all",
43+
"sourceMap": false,
44+
"namedChunks": false,
45+
"extractLicenses": true,
46+
"vendorChunk": false,
47+
"buildOptimizer": true,
48+
"budgets": [
49+
{
50+
"type": "initial",
51+
"maximumWarning": "2mb",
52+
"maximumError": "5mb"
53+
},
54+
{
55+
"type": "anyComponentStyle",
56+
"maximumWarning": "6kb",
57+
"maximumError": "10kb"
58+
}
59+
]
60+
},
61+
"hmr": {
62+
"fileReplacements": [
63+
{
64+
"replace": "src/environments/environment.ts",
65+
"with": "src/environments/environment.hmr.ts"
66+
}
67+
]
68+
}
69+
}
70+
},
71+
"serve": {
72+
"builder": "@angular-devkit/build-angular:dev-server",
73+
"options": {
74+
"browserTarget": "angular-material-admin:build",
75+
"port": 3000
76+
},
77+
"configurations": {
78+
"production": {
79+
"browserTarget": "angular-material-admin:build:production"
80+
},
81+
"hmr": {
82+
"hmr": true,
83+
"browserTarget": "angular-material-admin:build:hmr"
84+
}
85+
}
86+
},
87+
"extract-i18n": {
88+
"builder": "@angular-devkit/build-angular:extract-i18n",
89+
"options": {
90+
"browserTarget": "angular-material-admin:build"
91+
}
92+
},
93+
"lint": {
94+
"builder": "@angular-devkit/build-angular:tslint",
95+
"options": {
96+
"tsConfig": [
97+
"tsconfig.app.json",
98+
"tsconfig.spec.json",
99+
"e2e/tsconfig.json"
100+
],
101+
"exclude": ["**/node_modules/**"]
102+
}
103+
}
104+
}
105+
}
106+
},
107+
"defaultProject": "angular-material-admin"
108+
}

package.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "angularmaterialadminfull",
3+
"description": "Angular-Material-Admin-Full - template backend",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build --prod",
8+
"lint": "ng lint",
9+
"hmr": "ng serve --configuration hmr"
10+
},
11+
"private": true,
12+
"dependencies": {
13+
"@agm/core": "^3.0.0-beta",
14+
"@angular/animations": "^13.2.4",
15+
"@angular/cdk": "^13.2.4",
16+
"@angular/common": "~13.2.4",
17+
"@angular/compiler": "~13.2.4",
18+
"@angular/core": "~13.2.4",
19+
"@angular/forms": "~13.2.4",
20+
"@angular/material": "^13.2.4",
21+
"@angular/platform-browser": "~13.2.4",
22+
"@angular/platform-browser-dynamic": "~13.2.4",
23+
"@angular/router": "~13.2.4",
24+
"@auth0/angular-jwt": "^3.0.1",
25+
"@danielmoncada/angular-datetime-picker": "^13.1.1",
26+
"@ng-select/ng-select": "^8.1.1",
27+
"angular-calendar": "^0.28.20",
28+
"date-fns": "^2.14.0",
29+
"font-awesome": "^4.7.0",
30+
"moment": "2.15.2",
31+
"ngx-smart-popover": "^1.4.0",
32+
"ngx-toastr": "^14.2.1",
33+
"rxjs": "~6.5.5",
34+
"tslib": "^2.0.0",
35+
"zone.js": "~0.11.4"
36+
},
37+
"devDependencies": {
38+
"@angular-devkit/build-angular": "~13.2.5",
39+
"@angular/cli": "~13.2.5",
40+
"@angular/compiler-cli": "~13.2.4",
41+
"@angular/language-service": "~13.2.4",
42+
"@angularclass/hmr": "^3.0.0",
43+
"@types/jasmine": "~3.6.0",
44+
"@types/jasminewd2": "~2.0.8",
45+
"@types/node": "^12.12.64",
46+
"codelyzer": "^6.0.0",
47+
"ts-node": "~8.3.0",
48+
"tslint": "~6.1.0",
49+
"typescript": "4.5.5"
50+
}
51+
}

src/app/app-routing.module.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
2+
import { NgModule } from '@angular/core';
3+
4+
import { NotFoundComponent } from './shared/not-found/not-found.component';
5+
import { AuthGuard } from './modules/auth/guards';
6+
import { LayoutComponent } from './shared/layout/layout.component';
7+
import { routes } from './consts';
8+
9+
const ROUTES: typeof routes = routes;
10+
11+
const route: Routes = [
12+
{
13+
path: '',
14+
redirectTo: ROUTES.DASHBOARD,
15+
pathMatch: 'full',
16+
},
17+
{
18+
path: 'login',
19+
loadChildren: () =>
20+
import('./modules/auth/auth.module').then((m) => m.AuthModule),
21+
},
22+
{
23+
path: '404',
24+
component: NotFoundComponent,
25+
},
26+
{
27+
path: '',
28+
component: LayoutComponent,
29+
children: [
30+
{
31+
path: 'dashboard',
32+
pathMatch: 'full',
33+
canActivate: [AuthGuard],
34+
children: [],
35+
},
36+
{
37+
path: 'admin',
38+
loadChildren: () =>
39+
import('./modules/CRUD/crud.module').then((m) => m.CrudModule),
40+
},
41+
{
42+
path: 'app',
43+
loadChildren: () =>
44+
import('./modules/pages/pages.module').then((m) => m.PagesModule),
45+
},
46+
],
47+
},
48+
{
49+
path: '**',
50+
redirectTo: '404',
51+
},
52+
];
53+
54+
@NgModule({
55+
imports: [
56+
RouterModule.forRoot(route, {
57+
useHash: true,
58+
preloadingStrategy: PreloadAllModules,
59+
relativeLinkResolution: 'legacy',
60+
}),
61+
],
62+
exports: [RouterModule],
63+
})
64+
export class AppRoutingModule {}

src/app/app.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<router-outlet></router-outlet>

src/app/app.component.scss

Whitespace-only changes.

0 commit comments

Comments
 (0)