📜 ⬆️ ⬇️

Apartama - a service for interior design and not only

For more than a year, we kept our project secret - without holidays and without days off, worked on the Apartment - “a service for interior design and not only”, and now, finally, we can tell our users about it.


Inside the story about the project in part one and the technical details in part two


Meet Apartama!

The idea of ​​the project was born to our team while working on the program for the demonstration of upholstered furniture from one of the Russian manufacturers. Then we thought how great it would be to make the same program, but immediately available online, and uniting a lot of furniture manufacturers. Fortunately, our idea received understanding and support, and we received resources for project implementation.

Apartama can be interesting for anyone who is faced with the need for repair, redevelopment, rearrangement of furniture or creates the interior design of his apartment. All these people had the opportunity to experiment with interior items and finishing materials and visualize their ideas. At the moment, our base is filled with a set of 500 interior items and about 700 finishing materials created by us for the launch of the project. Our company began to conclude contracts for the placement of products of real manufacturers in our editor. On the other hand, the service represents a new format of advertising for companies engaged in the production and sale of furniture. For them, Apartama gives the opportunity to transfer products from advertising stands directly to the apartment of a potential buyer. Without leaving home, a person can familiarize himself with the products of a furniture store, view it from all angles, in various trim levels, using all possible finishing materials and find a place for it in a three-dimensional copy of his real apartment.


We are definitely entering the market, where software for furniture companies has already been presented, to one degree or another satisfying their needs. Our colleagues can be divided into three conditional groups:

Offline software for designing furniture. (Basis furniture maker, DS3D, PRO100, bCAD, Outline3d (available online)). Depending on their functionality, they allow you to: assemble various sets of furniture from standard modules, calculate the size of the modules, determine the number of materials required for their production, obtain specifications, etc.Thus, they provide a lot of opportunities for the manufacturer (especially for furniture manufacturers) , but at the same time represent the interests of only one furniture brand, are difficult to use and are available to buyers only through the seller.

Planners (foreign: Floorplanner, Planningwiz, Autodesk dragonfly; Russian Roomix (service unavailable), liveplan.ru). These applications are very easy to use, are available online, allow you to draw the layout of any room and fill it with furniture (abstract most often). But at the same time they are inferior in visualization quality (costs of flash-technology) and have limited possibilities for arranging furniture.

Programs for trying on fabrics for upholstered furniture (for example, Elarbis). These programs provide high quality visualization, allow you to change the materials of a piece of furniture, but they are very narrowly sharpened for the demonstration of upholstered furniture, i.e. again represent the interests of only one brand and do not have an online version.

While working on the Apartment, we relied on high-quality visualization, easy interface with wide capabilities and accessibility of the service online. We believe that realistic visualization is important both for users, for making various interior and repair solutions, and for sellers to present their products. That is why our editor is based on Unity 3D technology, which allows you to demonstrate three-dimensional objects directly in the browser, while having access to all modern graphic technologies. In the editor, you can change the materials of the walls and the floor, and, moreover, select the finishing materials for each piece of furniture and decor. For all created interiors, you can take a virtual walk. We tried to make the interface as simple as possible so that any user, without special training, could immediately begin to implement their ideas. We continue to improve the interface based on the wishes of our customers (manufacturers, retailers) and ordinary users.

Thus, on the one hand, Apartama solves the same problems as professional programs, on the other, is accessible and simple for users, and, on the third, it takes into account the needs of individual segments of manufacturers: upholstered furniture, modular furniture, finishing materials, etc.


That same is our editor.
Create a 3D model of the apartment - the floor and walls, windows and doors. At the same time, we created more than 600 standard layouts painfully redrawing the drawings from the BTI, and in most cases it is enough to choose your apartment on the site.
However, it is always possible to create a plan yourself, if it is not in the database:

Choose finishing materials for walls and floors. For the walls there are several layouts on the materials (if you want a curb on the wall - please) and we plan to add even more.

Put in the apartment furniture from more than five hundred items from real manufacturers and choose the most suitable materials (for example, the same chair can be covered with fabric or leather, and for the armrests and legs you can choose the type of wood).

Take a virtual walk through the new apartment.

Get the specification for your interior.

Boast to friends with flash widget with a panorama of the apartment.

additional services

Market. Another equally important part of our project is the Market. It will allow you to immediately order from online stores or simply find out the price of selected materials, furniture and decorative items, as well as get an estimate of the entire design project.

We thought that it would be great to bring together all those products that may need to be repaired, and as a result we collected two dozen online stores and more than twelve thousand items under one roof. And we plan to constantly replenish this section.

Interiors. And for those who do not have enough ideas or who want to see what beauty other users and famous designers have put on, we have made an “Interiors” section with a bunch of pictures. Here you can upload your gallery and boast a new apartment design.

DIY repair. For technical questions, we have made an “Articles” section, which is gradually being filled in and over time will turn into an encyclopedia for repair.

Blogs. Well, to solve any remaining questions there are “Blogs”, professionals in various fields - designers, specialists in Feng Shui, redevelopment, handmake, etc. will be involved in communication in this section.

People change - this is a property exchange service without intermediaries. The service has already been launched, but we will tell about it in a separate article.


Our 3D editor exists in three versions:

Options for monetizing the hypermarket:


Many users will be interested to know what's inside the apartment, and we will be pleased to tell about it in turn.


We love janga, because it makes our life much easier and allows us to concentrate on important things and hold our head less.
Apartama is divided into several applications for each of the sections - market, blogs, sharing, etc. and connects two dozen third-party applications, in which we try to contribute back where possible.
Django helps us very much in terms of administration, the fact that in django is a good and almost automatic admin panel, I think many people know. We actively use it for a huge number of applied tasks - admin panels for partners. reporting services, collection of editor usage statistics, etc.
To make the administrative interface more pleasant and convenient, we use django-grapelli and grapelli-admin-tools - with it the interface is transformed very much for the better.

LANMMP stack

In this question we are conservative, Django is launched via WSGI inside Apache. The data is stored in MySQL, which has developed historically, and now we would choose PostgreSQL which we love much more, but so far we have no sufficient arguments and resources for migration. The data is cached in memcached, we use only caching inside templates, placing parts of templates in the cache that take a long time to generate. Some data is cached in denormalized fields, whose validity is supported by save signals, but there are few of them. And all this runs on CentOS, but we honestly can not tolerate it.
Statics are given via NGINX, bypassing apache, NGINX also works as a front-end for Apache for all dynamic pages.
With static in our case, everything is not as simple as we would like. Alas, it’s impossible to get rid of Nginsky alone. In addition to returning a standard set of statics - javascript, images and styles, we give data to the editor, these are two types of resources - textures for finishing materials and models. Textures on average have a size of 100-200 kilobytes, models - 2-3 megabytes. Taking into account the preview images, about two thousand objects can be loaded into the editor.
Therefore, we emphasize two situations of obtaining statics — the initial loading of a large number of small pictures and the loading of models. Of course, I want to distribute static very quickly, so that the loading of heavy models takes place as quickly as possible - no more than a few seconds, which means that for the return of each model we need to have a channel of several megabits per user. For some time we coped on our own, the benefit of Nginx did not let down and gave static at a more than acceptable speed. But it became completely clear to us. that by own forces from the same habraeffekta we will not fight back

Amazon S3

At first, we were somewhat wary of using S3. It was necessary to double-check several times, whether we consider the cost correctly - it was too cheap. It turned out, indeed, Amazon offers excellent conditions for data storage in our situation. We transferred to S3 files of models, all materials, the editor itself and data files. Here is how much we pay, as a result of this Amazon:

Screenshots of the interiors, as well as other statics, we continue to keep in our own, thereby, without complicating the file loading system. Now we just need to run a slightly modified script from the django-command-extensions suite and all files are automatically synchronized with S3.
The main concern was the fact that Amazon’s repositories are located in Europe. But after several tests, it became clear that the data is given on average even faster than from a server in Moscow. Amazon, of course, has its own specifics, so the models begin to download in the first one or two seconds at a not very high speed, which then increases dramatically.


One of the central technologies of our entire project. Do not be a unit - not the fact that Apartama would be born. Unity has great opportunities, and, in general, it is a very thoughtful and powerful platform.
Thanks to Unity, we can show full 3D scenes in the browser - with shadows, complex lighting patterns, shadow maps and special effects like SSAO.
The big plus of the unit is that at the same time we support both online build for web sites and full-fledged offline version in the form of a win application for our partners at the same time.
We are looking at the third version of the unit with great interest, and will gladly transfer the apartment to it as soon as we have time to edit all the changed things.
Unity, of course, is also not perfect. First of all, the situation with bug fixes is very sad - intermediate releases are very rare, it’s not about getting any bug fixes. But what to say, a critical security bug was not corrected for more than six months after the first report.
Secondly, the unit policy is sometimes puzzling - you think that by buying a pro version for fifteen hundred dollars, you will get all the functionality - but not. For example, local caching and access to the webcam can be obtained only by giving a percentage of sales in a unit and proving that you are a large company. To understand this, of course. it is possible, but it grieves that the administration continues to assert that the same local cache is inaccessible not for financial reasons, but because the team of the unit does not want end users to clutter up their hard drives.

Deployment and various optimizations

As long as the apartment lives on the same server, the procedure for delivering the new version of the site is not too complicated. We use the bash script that pulls from the git repository on unfunddle.com, applies the south migration, copies the new version of the editor to static, updates the XML for the editor, synchronizes the S3 storage for all files via the manage.py command and reloads apache with the last step.
We try to follow (albeit without fanaticism) the google and yahoo optimization guidelines, so most of the graphics on the pages are assembled into sprites (thanks to our wonderful typesetter), all statics have far expire dates, and it, in turn, is compressed via django-compress.

Sincerely, apartama.ru team

Source: https://habr.com/ru/post/106950/

All Articles