8 ms·
Just open sourced my 10k LOC PHP & MySQL invoicing app
- manelvf 14y agoHow many users did you have?
- renownedmedia 14y agoThere was only about 120 users at its peak. I hesitated, was never ready to make it a real money-making business, and therefor didn't really advertise it.
- Alan01252 14y agoI've a few questions if you have the time. Did you never charge? Or were you charging? What were the reasons it was / you were not ready to make it a money making business? Any mistakes or lessons learned while building/running the software? Where did the 120 users come from? As someone who is looking to create their own product soon I'd be really grateful for any response you can give. Thanks Alan
- renownedmedia 14y agoFor a few months I had the ability for users to sign up for a paid account, but I never pushed it. After that, I just disabled the feature altogether. The most advertising I did do was a 125x125 ad on a website used by web developers (DavidWalsh.name) for one month. I didn't get a single user through that ad though. The biggest lesson learned is that an app like this really needs someone who is good at marketing. I'm just a programmer, but if I had found a marketer and pursued the development of the app, I'm pretty sure it could have been successful. Another take away is to research competitors. I never looked them up since I actually built this mostly for myself at first, and just kept adding new features as it got bigger. It turned out the market was very crowded (This page has a list of 17 competitors: http://thomashunter.name/blog/shutting-down-and-open-sourcing-neoinvoice/ http://thomashunter.name/blog/shutting-down-and-open-sourcin...). Also, "piss or get off the pot". I spent a lot of time developing this but I didn't devote enough of my time to it for it to be successful.
- atomical 14y agoI wouldn't describe a market with 17 competitors as crowded. Maybe others would disagree. I'm building an invoicing app for a niche market so I'm probably biased.
- Alan01252 14y agoThank you very much for taking the time to reply! Also I know you're getting a lot of stick in this thread for the code which I feel is unjustified, I just want to say I commend you for open sourcing it.
- renownedmedia 14y agoThanks for the encouragement! I get flack from everything I open, must be a sign.
- scoot 14y agoIt's a sign that people are interested in,and paying attention to your code. Take it as a compliment!
- obituary_latte 14y agoIs that mochaUI? Looks like it. Tried using it recently and it actually was quite nice despite the lack of docs and other various hiccups. At any rate, thanks for putting it out.
- renownedmedia 14y agoYeah, it's MochaUI. About two years ago, the project was mostly un-maintained, I haven't looked at it recently though.
- hackermom 14y agoI can't believe you hardcoded this for MySQL instead of using PDOs, and I can't believe the 10k line count for this. Gosh. Is "de-engineering" a proper term for this?
- markhuus 14y agoI can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.
- markhuus 14y agoNo I'm serious here, renownedmedia. Don't disregard my rant with a silly downvote, but do instead indulge yourself in the PDO methods instead of painting yourself and your projects into corners: http://php.net/manual/en/book.pdo.php http://php.net/manual/en/book.pdo.php
- renownedmedia 14y agoIt wasn't me who downvoted you, I promise! I love PDO; please read my other comment.
- citricsquid 14y agoYou can't downvote comments that are a reply to your own item, the person that downvoted you is not the OP -- unless he used an alternative account. I would suspect someone else did, the tone of your comment isn't one that really fits with the HN environment even if your point is valid.
- aaronpk 14y agoHaving just converted an app to use Postgres from MySQL, I can tell you that the PDO drivers only get you so far. You're still ultimately going to be writing SQL, and then you have to get into the differences between MySQL's `key`="val" and Postgres' "key"='val' quoting differences.
- savories 14y agoYou probably got down voted because you seem like a dick, rather than a helpful, nice, encouraging person.
- rpeden 14y agoWhat makes you think he was the one who downvoted you? You could easily have asked him about his technical decisions without being a jerk. Besides, this was a personal project, probably created without the intention of eventually open sourcing it. If he only ever intended to use MySQL, and portability across RDBMS systems wasn't a goal, then it's fine as it is.
- PleaseBeSerious 14y agoWhat would you do different based on what you know now?
- renownedmedia 14y agoWhile I was at a startup recently, I did all of my frontend development in Backbone.js, this app would do a lot better in that framework. Also, the CI framework isn't all that great, I would have certainly used a different framework. Perhaps even Node.js (which is what I'm doing a lot of my development in nowadays). I also would have looked for a marketer and devoted more time to the project. The market for this kind of product is very crowded, but there is a lot of room for innovation.
- lftl 14y agoI'm curious why you would choose Node.js instead today. I've done a little Node.js work, and I would unequivocally use it again for anything that needs a fair amount of concurrency, or high volume, lightweight requests. Other than that though, the only advantage I see over other server side stacks is a slight mental bonus in using the same language on both the client and server? Are there any other major advantages you see over PHP/Python/Ruby,etc. stacks?
- bdunn 14y agoI don't think anyone's ever subscribed to a SaaS product because it used X technology over Y. I also think you're way too focused on the tech and the list of features, instead of selling a solution. You can say all you want about invoicing being an over saturated market, but I launched a very successful project management product a few months ago. Focus on doing a few things very well, and you can do well in just about any "saturated" B2B space.
- shawn_smith 14y agoSpot on!
- swang 14y agoWhat exactly did you dislike about CodeIgniter? For me CodeIgniter is probably what I'd use if I had to go back to making PHP applications so I'd like to hear any reasons you had against it.
- renownedmedia 14y agoCI was built in the PHP4 days, and for that reason it has a lot of cruft left over. For example, there is no autoloader. Also, classes are loaded as singletons, and are assigned to properties of the controller, which I put into the 'magic' category, and isn't compatible with IDE autocomplete features (I'm a VIM user, but it makes things easier for a lot of developers). //CI Class Load Example: $this->load->library('example'); $this->example->something(); //Raw PHP Class Load Example: $this->example = new Example(); $this->example->something(); As you can see, the latter is a little more obvious about what is going on.
- citricsquid 14y agoI'm not comp sci educated, I'm all self taught so maybe "Autoload" has a real meaning outside of this context, but CI does have an autoloader... something that can autoload libraries and models? application/config/autoload.php
- rokhayakebe 14y agoVery good question. I am self taught as well, and have been using CI for about 2 years now. I can autoload libs and helpers. I would love to read his answer there. Also another question would be which frameworks is he currently using and what are its advantages.
- renownedmedia 14y agoI answered his questions directly; I'm not doing too much PHP development these days, it is mostly Node stuff.
- renownedmedia 14y ago
- mmmooo 14y agoJust as a quick look, this thing is riddled w/ potential sql injections..a number of unchecked/unescaped uri controlled variables. In some cases there's validation of numerics w/ +=0, but in many cases (e.g. $sort_col) there's none.
- renownedmedia 14y agoThe routing script should be taking care of that stuff with regular expressions. If I'm wrong, please do let me know!
- jumby 14y agoyou mean you shouldn't trust user input?
- renownedmedia 14y agoThe arguments to controller methods (in CI) are passed through some regular expressions. CI goes as far as to destroy all GET variables (which I highly disagree with).
- mmmooo 14y agoGET's are all removed (by default), but for uri segments you'll just get some character filters, and some anti-xss attempts (assuming you have that on). Nothing anywhere near sufficient to prevent sql injection. Again, didn't dig too deep, but I don't see any validation that would prevent me from doing some level of at least blindsql..
- rokhayakebe 14y agoI think CI rejects anything in the URI which isn't alpha-numeric. Would that solve the issue?
- mmmooo 14y agoKind of, anything in permited_uri_chars is allowed. This includes spaces, slashes, commas, %, and a handful of others by default. As I said only skimmed quickly so maybe I'm missing it. Will take a deeper look in a bit once not on mobile.
- jumby 14y agoI remember writing invoicing systems like this. Then I realized I probably shouldn't reinvent the wheel or break GAAP. :/
- renownedmedia 14y agoYeah, there is a ton of competition. I started building this without having done proper research.
- jumby 14y agoSee, the thing is: creating an invoice is an 'accounting' event that needs to be thought out a bit. Like a double entry general ledger, receiving payments, proper audit trails, the inability to modify an invoice after 'posting' it, batches, periods, and other goodness. Otherwise, you get this ugly term: embezzlement. But kudos for opensourcing it and standing up to criticism from hecklers like me.
- ericingram 14y agoI disagree, as a business should think first in the broad context of product/market fit, which is a very dynamic issue, and not all markets need the kind of depth in an accounting product you describe.
- einhverfr 14y agoThe only case where that my be true is the case where you have a sole proprietor where the owner is the only one who touches the books. As soon as you have a bookkeeper who is not the owner, or multiple owners you do need that kind of depth.
- ericingram 14y agoI'd bet the OP intended it for use by sole proprietors like himself, and that he never aimed to build a product for bookkeepers. There's plenty of a market for invoicing software that targets sole proprietors. A product with as much depth would likely appeal to accountants or those that assist them directly.
- danso 14y agoI didn't look through the PHP or MySQL code but the front-end has a clean look (from the video), which is more than is expected from most people who take it upon themselves to develop an invoicing system
- renownedmedia 14y agoThanks! The public facing layout went through three major revisions and the final one is based on 960.gs. The layout of the app is governed by MochaUI, but it is a custom theme.
- BjornW 14y agoThanks for sharing! I wished more people would share code of projects they are no longer interested in. The educational value ('how did he/she built this') is worth a lot, regardless of the 'quality' of the code. Thank you!
- renownedmedia 14y agoI have the exact same sentiment; I pretty much open source all of my old projects for people to learn from (I taught a small meetup for a while, it was useful to explain both the good and the bad). I add DEFUNCT to the description if they are really old or have a lot of bad practices. Here's the rest: https://github.com/tlhunter https://github.com/tlhunter
- TazeTSchnitzel 14y agoThat's an excellent idea. I should go add that to some of my horrible, horrible C code, lest someone think that 10 levels of indentation, not using c-style strings, non-portability, architecture assumptions, lack of error checking, and blocking sockets is a good idea... Or that macros without bounds checking that cause segfaults unless debugging is a good idea... What was I thinking?
- renownedmedia 14y agoHeh, I'm not well versed in C, but it sounds scary. You can also throw comments in the code where the bad stuff is so that it has more visibility, as well as suggestions for how to better solve the problem. Sometimes people learn best from bad code!
- TazeTSchnitzel 14y agoGood idea. It should sound scary, it's the worst code I've ever written. I wrote it 2 years ago with the idea "working first, correct later", but I haven't finished the latter yet...
- TazeTSchnitzel 14y ago
- justinkelly 14y agogreat to see this open sourced - sorry to hear you closed neoinvoice though the web based invoicing market is extremely crowded and very hard to complete against the likes of freshbooks.com though i went the opposite route to you and its working $ for me created the open source app http://simpleinvoices.org http://simpleinvoices.org first, got large user based, then offered premium hosting at http://smarterinvoices.com http://smarterinvoices.com
- einhverfr 14y agoI think at one point we had some LedgerSMB users using SimpleInvoices and importing data into LedgerSMB. I think the difficulty with invoicing is that it is so heavily tied to everything else one might try to do in a business, from tracking inventory to CRM to financial accounting. This doesn't mean that one can't do this, but the interconnections seem to be key.
- justinkelly 14y agore ledgdersmb - yep - the ledgersmb crew did some great work to the SimpleInvoices code to make it work for them re interconnections * depending on the target market * the people who need integration already do some form of accounting already - and a 'full stack' accounting solution like http://xero.com http://xero.com is more appropriate for this market * simpleinvoices market is people with no accounting system or desire for debit/credit stuff so we have make no attempts to make quickbooks, etc. integration work
- jbigelow76 14y agoI'm curious, I remember a posting a while back that you were trying to sell this app through Flippa? Any details of that experience you would mind sharing (nothing but tire kickers, not the right market, buyer fall thru, etc...)?
- renownedmedia 14y agoLong story short, not a single bid. A lot of people would ask some questions, but would seem to ignore the info on the page. I didn't bother paying extra to have them tweet the site on their twitter, since they tweet seemingly hundreds of times a day and nobody seems to listen. I'm used to selling items on the Envato marketplace, which provides all of the 'advertising' for me. But it seems that with Flippa, there is so much noise and one has to do their own finding of buyers.
- pdufour 14y agoThis looks like you put a lot of work into this. Thanks for open sourcing it.
- deleted 14y ago[deleted]
- krob 14y agoOkay, so coming from a user of CI 2.0 mind you and using integrated smarty templates with it, I would have to say after using even a micro-framework say silex, I could build a much better enterprise application with modern php5.3/5 features than i can with CI. The major problem is it feels really dirty to include/require statements with CI. Also to build re-usable code within the confines of their existing library system you have to build all your constructors with a single $param argument. The models are junk since they are really just a place to store organized function calls. Their database abstraction is an abomination. Generally the only thing good about CI is that you can break up your source into a marginally logical fashion which can it improves maintainability. Now as for this application being written in Code Igniter? I don't really see it as a problem since it means it will be easier for lesser experienced dev to pick up and run with the ball. In time they will learn it's major deficiencies and they will move on. But i think there is room for improvement, in fact I think this would be a great project to port to another maybe more robust framework and is a good project for learning new framework translations. I will say however that the author wanting to rewrite a product like this in nodejs is really only going to make something like this more inherently difficult to maintain since javascript code tends to get more complicated than your typical java / php / python app as it grows. Granted you do have js at your finger tips it is still largely un-tested on massive scale for large application development. It however has shown great promise for handling extreme traffic in terms of concurrency, but it handles it mostly by using async libraries which pile everything into queues of some sort some where. So your code is littered with async callbacks everywhere. Anyways.. Not only that, but the biggest problem of all is the inability to intelligently step through your code with some kind of IDE beyond using a browser-base debuger such as webkit inspector or the online IDE cloud 9. I don't hate nodejs. I just think people are jumping on the band wagon way too quickly for server-side hosting. For websockets it's a great solution, I just don't like seeing it as "the only solution" for some peoples projects. I'd rather see a more hybrid approach.
- BadLogInMyAss 14y agoDoes it say anywhere what "10k LOC" is supposed to mean?