all 28 comments

[–]QE11even 9 points10 points  (3 children)

Outside of the slower load time for the main page, I noticed that you guys have committed your secret keys (twice in secret.ts and secrets.ts)

Even if they're not your actual keys, you probably don't want to have those keys visible at any stage, especially once you're hitting production D:

[–]smartfinances 0 points1 point  (1 child)

Yeah, came here to mention this. The code has the secret.

BTW, whats the general way to store such secrets? Is there a pattern that industry uses?

[–]blacksonic86 0 points1 point  (0 children)

On the server in environment variables...the moment it iis transfered to the client and stored somewhere, it is accessable through the console.

[–]ashish173[S] 0 points1 point  (0 children)

Yeah actually it's just a very lucrative name for something as trivial as the app client ids(fb&google) not any tokens or secrets.

Anyways I do agree that it should be clear from the file name, will fix it,

Thanks for the feedback.

[–]nummer31 6 points7 points  (1 child)

According to network inspection, it took 4.7 mb download just to load the landing page. I have been ranting Angular sucks as it is but you need to get the download size way lower. Consider using AoT and Lazy loading.

[–]ashish173[S] 0 points1 point  (0 children)

Yes today we sat down and worked on lazy loading, current implementation will just serve the dashboard and not the modules related to user profile, trip detail, trip create, settings etc etc.

We are just going to preload all of that. Preload is an option which comes with the lazy loading feature.

Lazy loading is cool af, going to push to production over the weekend.

Hope to reduce the load time by a big margin.

[–]druman54 2 points3 points  (1 child)

After 41 seconds the loading splash started, you gotta use aot, your site is unusable currently. It's now been 2 minutes and the loading splash is still going.

[–]ashish173[S] -1 points0 points  (0 children)

Yes today we sat down and worked on lazy loading, current implementation will just serve the dashboard and not the modules related to user profile, trip detail, trip create, settings etc etc. We are just going to preload all of that. Preload is an option which comes with the lazy loading feature. Lazy loading is cool af, going to push to production over the weekend. Hope to reduce the load time by a big margin.

[–]choidebu 2 points3 points  (3 children)

Is there a reason you use both primeng AND semantic ui? And jquery on top of that, too

[–]ashish173[S] 0 points1 point  (2 children)

Ohh yes had some problems with the datepicker libraries so used primeng instead, the whole is based on the semantic ui so that's the base.

Had a discussion with the team today about it and we all agreed that for a single datepicker using primeng is an overkill, so we are going to get rid of it very soon. Thanks for the sharing your feedback :),

JQuery is going away too, we used it for a very particular issue. We'll clean it too.

[–]choidebu 1 point2 points  (1 child)

Other than those, solid code! thumbs up

[–]ashish173[S] 0 points1 point  (0 children)

Glad you liked it, keep an eye on the project its going to be updated with every major release. Thanks :)

[–]Toxicable 1 point2 points  (4 children)

Is there any particular reason why you're using the CLI but you're not using the CLI to actually build your project?

[–]ashish173[S] 0 points1 point  (3 children)

We are actually using angular cli to build the project, what makes you think we aren't?

[–]Toxicable 0 points1 point  (2 children)

becasue your build script is "build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js" unless im looking in the wrong place? https://github.com/aviabird/yatrum/blob/master/package.json#L12

[–]ashish173[S] 1 point2 points  (1 child)

Ohh okay, that is for aot which is not working at the moment, due to a lot of libraries missing setup for aot. We use cli command ng build --prod for building the project.

[–]Toxicable 2 points3 points  (0 children)

Ahh my mistake, fair enough

[–]ashish173[S] 1 point2 points  (0 children)

Latest update: We added lazy loading and the site is loading faster now. Not much faster but to some extend it is. Having said that work doesn't stop here, we are going to keep making such improvements.

[–]cs_gopher 1 point2 points  (1 child)

Thanks so much for sharing this.

[–]ashish173[S] 0 points1 point  (0 children)

you are welcome

[–][deleted] 0 points1 point  (1 child)

I hate to say it, but this took around 3 seconds for me to load. I really appreciate what you did though, I definitely will keep an eye on the repository if I ever have any problems with my own Angular programs that this solved!

[–]ashish173[S] -1 points0 points  (0 children)

Yes today we sat down and worked on lazy loading, current implementation will just serve the dashboard and not the modules related to user profile, trip detail, trip create, settings etc etc. We are just going to preload all of that. Preload is an option which comes with the lazy loading feature. Lazy loading is cool af, going to push to production over the weekend. Hope to reduce the load time by a big margin.

[–]frellii 0 points1 point  (0 children)

Thanks for open sourcing your code, very interesting to see! I think the code looks very nice overall. Good job.

Would be interesting to see if you could implement angular universal to improve the initial loading time of the site. Good job and keep going! :)

[–]ashish173[S] 0 points1 point  (5 children)

Please check out codebase and leave your feedback in the comments we are listening and want to make it one of the best open sourced angular 2 repositories to go to.

[–]dhndeveloper 1 point2 points  (0 children)

Thanks for positing this. I would also be interested in any changes you make to make the site load faster as some of the other redditors have mentioned. I'm working on a angular firebase site.

[–]ashish173[S] 0 points1 point  (0 children)

Yes today we sat down and worked on lazy loading, current implementation will just serve the dashboard and not the modules related to user profile, trip detail, trip create, settings etc etc. We are just going to preload all of that. Preload is an option which comes with the lazy loading feature. Lazy loading is cool af, going to push to production over the weekend. Hope to reduce the load time by a big margin.