Hasnayeen / invobook

Self-hosted app for Time Tracking, Invoice Generation, Project & Client Management, built with Laravel & Filament.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.git folder is 400MB big.. big files under /public/js.. composer fails because of Laravel 7

vesper8 opened this issue · comments

Hi there, just found out about this interesting project and am checking it out. I followed the instructions for the manual installation and I'm seeing some things that seem very wrong.

First of all, I see that the dev-master is now running Laravel 7, but you did not properly upgrade to Laravel 7 which causes the install to fail. The problem is that you've kept the old /bootstrap directory from a previous laravel version which makes a reference to /bootstrap/autoload.php but this was dropped in laravel 7:

- Dropped `bootstrap/autoload.php` ([#4226](https://github.com/laravel/laravel/pull/4226), [#4227](https://github.com/laravel/laravel/pull/4227), [100f71e](https://github.com/laravel/laravel/commit/100f71e71a24fd8f339a7687557b77dd872b054b))

Which causes a fatal error when trying to do a fresh install and running composer install

I replaced the /bootstrap folder, /public/index.php, /artisan and part of the phpunit.xml file from a fresh Laravel 7 install (basically every file that had a reference to the now removed bootstrap/autoload.php file, and I was then able to install without errors

I also had to add back the /Base/to the namespace in those 3 references inside /bootstrap/app.php

I also had to remove "@php artisan plugin:discover" from the composer.json as this was also causing an error since /plugins/composer/installed.json does not exist and as a result $packages is undefined. Not sure what this plugins system is and if it's just a dinosaur from the past or necessary

Another observation is that the files in this repository are pretty small and should only make up about 3MB. However the .git folder that you get when you run the git clone operation is a staggering 400MB!!! This may be a good starting point on alleviating this issue: https://stackoverflow.com/questions/5613345/how-to-shrink-the-git-folder

Furthermore the /public/js is full of huge files, many of which appear at first glance to be identical 4.3MB single.js.

All these files can be generated running npm run dev or npm run build so I don't think they should be committed/exist in this repo, and instead the command npm run dev/build should be added to the list of instructions when installing manually

Something also feels wrong that these files are so big when the source for them inside /resources/assets is so small, you are probably duplicating a lot of data as a result of how you're splitting up the files during the build process

I realize now that #964 "fixes" some of these issues.. but this "fix" was not pulled when I followed the installation instructions just now. Furthermore, the PR appears to add back autoload.php which doesn't make sense to me since you are now using Laravel 7, you should do a proper upgrade instead of re-adding things that have been officially removed.

Hope this helps,
Kind regards

As I continue to set it up on my machine.. a few other things..

php artisan passport:install needs to be after php artisan migrate --seed since it requires the database to exist, currently it is before (in the manual installation instructions)

I noticed that the .env.example file has DB_HOST=db instead of the default DB_HOST=localhost, I had to change it back to localhost before I was able to run php artisan migrate --seed

Happy to say that the project now runs locally and I was able to login and create my first project

My PR was a dirty fix to the broken state of things. I didn't have much time to go through "proper" fixing since I'm on a deadline to try this project and determine one of many as a long term solution.

Should Goodwork be chosen as the tool for the job I will certainly be willing to dedicate time helping solve issues regularly since it will then become an important piece of software to our workflow.

I was also unware that the project went through a Laravel version upgrade and that it was not yet completely done. I will take some time and make sure to help in any way I can to fix it properly, but right now I just needed to bootstrap a test version of Goodwork for the shows.

Thanks for pointing those out, since I really find Goodwork worth collaborating to.

Cool, thanks for mentioning this. I hope your presentation went well, would be nice for this project to receive more love in the future.

A few other things I found.. not sure if I should create a new issue.

When creating a task, if you enter a date that in the past you get an error message but it's generic and doesn't indicate what the problem is.

I wish there was a way to not have to set a due date on tasks.. perhaps the default should be "indefinite", at least that option should be available (I would like it to be the default). I just want to add tasks for myself to do and not have to set a due date.

After adding a task I would have expected "so-and-so adding X task" to automatically appear in the 'activity' tab but nothing appeared there.

It would be great if you integrated a Kanban board... I really love this one https://github.com/ayazsayyed/vue-kanban, despite the low stars and low activity, it is full-featured and works awesome

@vesper8 I think that this would be worth its own issue. Since it is a change/improvement on top of an existing feature.

And I agree, tasks w/o a due date should be a thing, since somethings just creep in the backlog for as long as time itself has existed... Hahahahahaha 😄

@vesper8

I noticed that the .env.example file has DB_HOST=db instead of the default DB_HOST=localhost, I had to change it back to localhost before I was able to run php artisan migrate --seed

DB_HOST=db because this app uses docker and docker has db as a services. If you install with docker then no need to change it.

When creating a task, if you enter a date that in the past you get an error message but it's generic and doesn't indicate what the problem is.

How did you select past dates as a due on date, can you elaborate it? I don't think this app let you select past dates on due on.

I wish there was a way to not have to set a due date on tasks.. perhaps the default should be "indefinite", at least that option should be available (I would like it to be the default). I just want to add tasks for myself to do and not have to set a due date.

Unfortunately, this app requires a due date on the task.

After adding a task I would have expected "so-and-so adding X task" to automatically appear in the 'activity' tab but nothing appeared there.

This feature is work in process.

@vesper8 thanks for checking the project. 200-300 MB is very common for a git project. The git/git project itself is around 200 MB. I tried to cleanup the git history as much as possible so should be little bit lighter now.

Composer install issue was due to buggy plugin discovery and not for Laravel 7 upgrade, should be fixed now.

About Kanban board, there is no plan to include it but soon will add a column view of task alongside with the current view without drag & drop functionality.

And for any bug or issue its better to create separate issue for each one so that we can track and resolve them easily. Thanks

How did you select past dates as a due on date, can you elaborate it? I don't think this app let you select past dates on due on.

Well.. I didn't have to do anything special, I just clicked on the 'due on' field which brought up a Calendar and then I selected a date before today.. see attached screenshot

Screen Shot 2020-04-17 at 8 33 26 PM

I can see that on your online demo it's not possible to pick a date before today, but after following the installation instructions, and then rebuilding the assets using npm run dev, I am able to

I also notice I'm getting this javascript error in the console

Screen Shot 2020-04-17 at 8 33 12 PM

I made some more cleanup in the git, it's should be half of the size of what it was before