Skip to content

sonytruelove/Place

Repository files navigation

PLACE

PLACE LOGO

EN RU CN


πŸ’₯PLACE IS OPEN SOURCE FILE SHARING STORAGE


PLACE allows users to store files in the cloud, synchronize files across devices, and share files.
You can set up by yourself OR get our help
I believe that Place will become the best easily scalable storage and media trading facility.
As well as a project for training soft, design, programming skills.
Feel free to send a pull request or create a issue!



Getting started

Setup git
Clone repository
Go to back-end directory:
cd server
Create ".env" and "docker.env" (Also change the data in s3 and env configuration if you want to work with Place.)
docker.env example:

DATABASE_URL=postgresql://root@crdb:26257/defaultdb?sslmode=disable&schema=public
JWT_SECRET=secret-key
S3_PORT=9000
S3_ENDPOINT=nginx-minio
S3_ACCESS_KEY=ACCESS_KEY
S3_SECRET_KEY=SECRET_KEY

`npx prisma generate` for connect env with prisma

Using Docker Compose

Setup Docker and Docker Compose

docker-compose build
docker-compose run 

Locally

Setup npm
Execute in terminal:

Setup nestjs/cli:
npm i -g @nestjs/cli
Install all dependencies:
npm i

Setup CockroachDB
Open a new terminal:
cockroach start-single-node --insecure

Setup minio
Open a new terminal:

minio server start

And finally:
npm run start:dev

Discription of Place development

Formulation of the task:

Build of a high-load easily scalable service for concluding media contracts between users, file storage and transfer.

Include a own currency, subscription

Requirements:

Front-end:
  • Fast, Simple, Presentable
  • Solves real problems
Source:
  • Optimized
  • Compliance with object-oriented programming patterns and paradigms
  • Testing
Back-end:
  • Stand like a million requests in one time
  • Minimize failures
  • Scalable architecture
  • One of the servers may fail - work will continue
  • All users must receive contracts

User Flow

User flow

Architecture and Tech Stack(previously)

Architecture

Front-end

Next.js, Typescript, Webpack

Back-end

  • Nest.js
  • S3 Minio
  • Cockroach DB
  • JWT auth, SwaggerAPI, Typescript, Prisma, Class-validator
  • Nginx, Docker, Minicube/K3s/KuberSpray

Why no cache?

  • Few files to cache
  • Warm-up required

Why no target audience research?

It's no start-up, so i needn't.

TODO:

  • βœ… Start developing a basic version
  • βœ… Describe a requirements
  • βœ… Describe a Architecture with Tech-stack
  • βœ… Introduce a server part of project
  • βœ… Describe a Code-of-Conduct
  • βœ… Describe User-flow
  • βœ… Develop UI kit
  • βœ… Develop Design system
  • βœ… Introduce a front-end part of project
  • Do a MVP
  • Start developing the Enterprise version
  • Connect Prometheus+Graphana logger
  • Divide into microservices

Changes

Remove TarantoolDB

Tarantool DB was intended for fast processing of small data and Cockroach DB for Big Data.
But the hypothesis that files can be stored in Cockroach DB was refuted. Also Prisma ORM doesn't work with Tarantool DB.

So, Cockroach DB processing all data and Tarantool DB remove from project for now.

Place is free for all contributors who want to make project better

I considered it necessary to have experience in maintain an open source project, as well as to see new ways to develop this project.