Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sonytruelove/place

:collision: Feel free to send a pull request or create a issue!
https://github.com/sonytruelove/place

beginer-friendly devlog docker docker-compose filesystem highload minio nestjs nextjs open-source place rest-api s3 scaleable storage trading

Last synced: about 2 months ago
JSON representation

:collision: Feel free to send a pull request or create a issue!

Awesome Lists containing this project

README

        

PLACE


PLACE LOGO



[EN](https://github.com/sonytruelove/Place/blob/main/README.md) [RU](https://github.com/sonytruelove/Place/blob/main/README_ru.md) [CN](https://github.com/sonytruelove/Place/blob/main/README_cn.md)




:collision: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](https://git-scm.com/downloads)


[Clone](https://docs.github.com/ru/repositories/creating-and-managing-repositories/cloning-a-repository) 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](https://docs.docker.com/engine/install) and [Docker Compose](https://docs.docker.com/compose/install)

```docker
docker-compose build
docker-compose run
```

Locally

Setup [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)

Execute in terminal:

Setup nestjs/cli:

`npm i -g @nestjs/cli`

Install all dependencies:

`npm i`

Setup [CockroachDB](https://www.cockroachlabs.com/docs/v23.2/install-cockroachdb-linux)

Open a new terminal:

`cockroach start-single-node --insecure`

Setup [minio](https://min.io/docs/minio/linux/operations/installation.html)

Open a new terminal:

```cd server
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](https://github.com/sonytruelove/HA-Contract-service/assets/42536061/94e367de-20e1-4f92-88f1-d445de710e9f)

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.