kamp.us web projects & packages
- sozluk: turkce terimler sozlugu - https://sozluk.dev.kamp.us
- pano: link & bilgi & soru cevap paylasim platformu - https://pano.dev.kamp.us
- gql: https://gql.dev.kamp.us/graphql
- pasaport: kampus icin kullanici bilgileri & centralized auth servisi - https://pasaport.dev.kamp.us
- storybook: @kampus/ui paketi icin hosted storybook - https://ui.dev.kamp.us
This repository is under heavy development, if you want to contribute either go
through package.json
file of each workspace and start familiarizing yourself
with the technologies we are using or join our discord server
and say hi to us at #kampus-projects channel.
- Fork
kamp-us/monorepo
under your personal account.- eg:
usirin/monorepo
- eg:
- Clone the project to your local computer:
# Download Repository
git clone git@github.com:kamp-us/monorepo.git
# Move into repository
cd monorepo
- Install dependencies.
npm ci
- Add the following text block to your
/etc/hosts
file.
127.0.0.1 localhost.kamp.us
127.0.0.1 pasaport.localhost.kamp.us
127.0.0.1 pano.localhost.kamp.us
127.0.0.1 sozluk.localhost.kamp.us
127.0.0.1 gql.localhost.kamp.us
- Duplicate
.env.example
files and rename them as.env
in the following folders:db/prisma
,apps/gql
,apps/kampus
,apps/pasaport
.
- Move to
db/prisma
folder.
cd db/prisma
- Start the image. (You should have docker installed.)
docker-compose up -d
- Generate artifacts. (e.g. Prisma Client)
npm run prisma:generate
- Push the Prisma schema state to the database.
npm run prisma:push
- Run seed command to fill database with demo data.
npm run prisma:seed
- Run the command below at the root folder.
# Runs "gql", "kampus" and "pasaport" apps so the platform can be alive with 1 command.
npm run web
- Now you can go to localhost.kamp.us:3000 to see it live. 🚀
# Runs all "dev" commands on each package inside the workspace
npm run dev
# Runs only "gql" server so backend work can be done separately.
npm run gql
- Go to OAuth Apps page on GitHub.
- Click on
New OAuth App
.- Application name: "you can choose any name"
- Homepage URL: http://pasaport.localhost.kamp.us:3001/
- Authorization callback URL: http://pasaport.localhost.kamp.us:3001/auth/callback/github
- Click on
Register Application
. - On the application page, click on
Generate a new client secret
. - Make the following changes to the corresponding files.
# apps/kampus, apps/pasaport
GITHUB_ID=<Your_Client_ID>
GITHUB_SECRET=<Your_Client_Secret>
- Now you can use
Sign in with GitHub
on development server.
/apps
: services & apps/db
: packages that is relevant to database/config
: packages that is relevant to configuration/packages
: internal (and maybe external in the future) npm packages
These folders are registered as workspaces in package.json
If you haven't already install Volta, you can install install it with:
curl https://get.volta.sh | bash